Pls help, <<if>> doesn't show up

Hello, I’m really new to Twine and codding stuff
and sorry in advance for my poor english

<<textbox "$name" "You" autofocus>>\
<<button "Confirm">><<set _ok to true>><</button>>

<<if _ok is true>>
Text here
<</if>>

So, I have confirmed that the button sets _ok to true
but the ‘Text here’ doesn’t show up :frowning: (no error message, just blank space)
Can’t figure the problem myself, please help!

The <<if _ok is true>> only gets checked when the passage is displayed (at which point you haven’t pressed the button, so _ok is NOT true (yet).

It doesn’t get re-evaluated when you press the button; it’s not like a spreadsheet. You might look at the new <<do>> and <<redo>> macros…

3 Likes

OH MY… Yes, it works perfectly with do and redo!!!
Thank you very much!!!

1 Like