Label + variable?


#1

Hi! I’m just diving into this, so I may be doing something stupid. Thanks for an help you can give!

Can I not use the following script?

*set room 102
*gosub_scene roomlist ${room}

Where I’ve numbered the labels.

I’m getting this error:

direch01 line 4: Invalid expression, couldn’t extract another token: ${room}

Thanks!


#2

I’m not certain, but does *goto_scene roomlist {room} work? :thinking:


#3

Sorry! I mean gosub_scene roomlist ${room}


#4

Oh my gosh! Yes, that worked. Thank you so much!!


#5

I’m fairly certain you only use the $ in front of {} when it’s something the player will see, otherwise, for pointers and such, it should only be { }


#6

That’s very useful to know. Thanks for the tip!