Forum | List Failure?

You must be logged in to post Login Register

Search Forums:


 






List Failure?

No Tags
UserPost

3:09 pm
April 2, 2010


PiRight

Member

posts 8

I'm trying to make a list, and… well, it isn't working too well.


I pulled the syntax straight from the documentation, but it still won't work for some reason:


list TestList

li One

li Two

li Three

showlist

label One

"1″

label Two

"2″

label Three

"3″

#End of code, start of post


For some reason, when picking "One", it jumps to label One as it should, and then on to Two, then Three. I'm completely lost as to why. Can someone help?

7:32 pm
April 2, 2010


saluk

Admin

posts 144

After the jump, it will continue to execute code straight through – a label is just a marker that can be jumped to, it doesn't divide code at all. So after you print "1″, you will need to jump somewhere else – usually back to the line above the list, if you want to allow the other options to be chosen:

label startlist
list TestList
li One
li Two
li Three
showlist
label One
"1″
goto startlist
label Two
"2″
goto startlist
label Three
"3″
goto startlist

You can also of course jump somewhere else if the player is only supposed to choose one of the options.

7:53 pm
April 2, 2010


PiRight

Member

posts 8

Ah – gotcha. Thanks.

No Tags