|
Development Forum |
 |
| 
Geek2Nurse
 

|
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
...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
 

|
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
 

|
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. |
|