Boolean - if/else

@set not map_seen

- [[look for a map]]
- [[search online]]

[[look for a map]]:
@set map_seen

[[search online]]

[[search online]]:

{if map_seen=true: map seen}{else: map not seen}

It returns "map not seen" no matter which road I take.
What am I doing wrong?


K.V.

Hello.

Try this:

@set map_seen=false

- [[look for a map]]
- [[search online]]

[[look for a map]]:
@set map_seen=true

[[search online]]

[[search online]]:

{if map_seen=true: map seen}{else: map not seen}

Got it to work with your code, but had to add spaces for the @set command

@set map_seen = true"

instead of

@set map_seen=true

Which is very annoying since that doesn't work inside {if:}{else:} commands, inside those you have to keep them without spaces:

{if map_seen=true: map seen}{else: map not seen}

Thanks for your help!


Do you even have to print out =true/=false?

I always use:

@set map_seen
@set not map_seen
{@not map_seen}
{@map_seen}


Yeah, your first example works for me if you just remove the "=true"-part from the last section:

{if map_seen=true: map seen}{else: map not seen}

I've seen this "bug" before. Even if its set as false/true in the debug-window in the bottom, it doesnt activate in the output. Don't know why. It has something to do with combining (for example) "@not (factor)" with "@(factor)=false".


K.V.

It may be because I tested that in the scratchpad thing in the Squiffy documentation instead of testing it in the current version of Squiffy.


Is the scratchpad not up to date?


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums