why this and only this "if" control does not work?

Medeste79
29 Sept 2017, 11:32

this code does not work. in the variabiles frame I see "DecompressionSee" is correctly set to "false" (at the beginning of the game), but in the game I get The "else" output: "[indossa una tuta]", and if I trigger the event that changes "DecompressionSee" to "true" it changes it but the control just give the same output. It is as the control isn't even there. I use this kind of control all over the game and it works perfectly as expected, but this one I can't understand why I can't get it to work. Tried to change the name of the variable, but it's the same.

Please help I'm stuck!
what's wrong?


[tute spaziali]:
@clear
Sono due tute...

{if DecompressionSee=false:Spero di non doverne usare una ma, vista l'emergenza, potrebbero essere utili.}
{else:[indossa una tuta]}

[Guarda la sala principale](sala principale02)

manowar
29 Sept 2017, 18:15

Can you post your complete sections?

This works:

[[first]]:
First of [[all]](tute spaziali)
@set DecompressionSee = true

[[tute spaziali]]:
@clear
Sono due tute...

{if DecompressionSee=false:Spero di non doverne usare una ma, vista l'emergenza, potrebbero essere utili.}
{else:[indossa una tuta]}

[Guarda la sala principale](sala principale02)

Medeste79
02 Oct 2017, 19:57

I haven't used any section. only passages. is it a problem?


Medeste79
03 Oct 2017, 10:31

ok, copying and pasting to notepad++ i saw that the definition of the variable DecompressionSee had an invisible type after the "false" value. rewriting the value of the variable made it work. The false value was actually false* (*=anything it was, it was not visible) and this caused the if control to fail.
ugh!

thanks.