creatures caves welcome, guest
downloads   gallery   dev   community   creatchi   forum   mycaves
bookmarks | search | post new topic
Development Forum
old
I need help with my SINS   
Geek2Nurse

Geek2Nurse
United States  

 visit Geek2Nurse's website: Adventures in Nornia
  4/26/2012

Okay...so va03 contains a classifier string, eg. "9 11 33." I know it does, because when I tell my norns to SEZZ it, they all stand up and say "9 11 33." So the code works to that point. (I know, that's not a valid classifier, but it doesn't have to be, right now, and I want the family number to be different than the index of the first space so I can tell my string manipulations are working.)

Now I want to find the location of the first instance of the space character in the string. So I do this:


sets va04 " "
setv va05 sins va03 1 va04


Then, enlisting the help of my norns again, I check to see what's now in va05 by first converting it to a string


sets va99 vtos va05


...and then telling them to "sezz" va99.

They all stop what they're doing, look at me sweetly, and announce, "9." Everything I see in the documentation tells me they should be saying "2," since the space is the second character in the string. Where have I gone wrong?

(Also, the example for SINS in the wiki does not contain the SINS command, which is just 'way too abstract for my brain after a long day at work. What's up with that?)



---
Optimist: the glass is half full.
Pessimist: the glass is half empty.
Engineer: the glass is twice as big as it needs to be.

 
Amaikokonut

Amaikokonut


 visit Amaikokonut's website: Naturing :: Nurturing
  4/26/2012

If it helps, your SINS code is right-- when I input this:

sets va03 "9 11 33."
sets va04 " "
setv va05 sins va03 1 va04
outv va05


I do indeed get "2" as a response.

My best guess would be to double-check your va03, or maybe post a bigger chunk of code so we can see more of what's going on.


[Naturing :: Nurturing]
 
Geek2Nurse

Geek2Nurse


 visit Geek2Nurse's website: Adventures in Nornia
  4/26/2012

Yep, looks like my norns were doing their best. My code seems to be working now; I don't know where the 9 was coming from, because I woke up this morning with the realization I didn't want to allow classifiers that didn't start with "2," and revamped everything based on that.

The debug stuff is working great -- as far as it gets. The script just kind of stops partway through. I posted it in the "reduce agent population" thread in this forum, if you feel like wading through it. I really appreciate everyone's help!


---
Optimist: the glass is half full.
Pessimist: the glass is half empty.
Engineer: the glass is twice as big as it needs to be.

 


downloads
cobs
adoptions
creaturelink
metarooms
breeds
 
gallery
art
wallpaper
screenshots
graphics
promos
sprites
dev
hack shack
script reservations
dev resources
active projects
dev forum
 
community
links
advice
chat
polls
resources
creatchi
 
forum
bookmarks
general
news
help
development
strangeo
survivor
mycaves
log in
register
lost pw
0 online
creatures caves is your #1 resource for the creatures artificial life game series: creatures, creatures 2, creatures 3, docking station, and the upcoming creatures family.

contact    help    privacy policy    terms & conditions    rules    donate    wiki