Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Quick question (I hope.) SugarCube 2 ver 2.5 twine 2. an if statment not showing up in debugger

edited April 2016 in Help! with 2.0
So I'm trying to figure out why an if won't even show up. when I activate debugging mode.

This is how I intended the if to look, but I have tested different <<if>> statements and none of them show up. So is there something to keep an eye for out that might cause this?
<<if $RacePrint isnot $StartRace>>

Comments

  • What exactly do you mean by "won't even show up"?

    a. If I copy your example into a new SugarCube 2.5.0 story and Test it I correctly see the following error message:
    cannot find a closing tag for macro <<if>>
    ... because the example does not have a closing tag.

    b. If I add the missing closing tag so that your example looks like so:
    <<if $RacePrint isnot $StartRace>><</if>>
    
    ... and Test the example again then I correctly see the following message
    <<if>><</if>>
    ... which indicates that the if's condition evaluated to false, which is correct because the uninitialized $RacePrint variable is equal to the uninitialized $StartRace variable.

    c. If I initialize both the variables before the <<if>> macro so that they contain different values like so:
    <<set $RacePrint to 0>><<set $StartRace to 1>>
    
    ... and Test the example again then I correctly see the following messages
    <<set>> <<set>>
    <<if>> <</if>>
  • I don't have much to add over what greyelf has gone over. When using Test Mode, the debug views are both enabled and displayed by default—clicking on the Debug View button in the UI bar toggles their display state.

    So, yeah, basically what he said. We need more details.
Sign In or Register to comment.