I can't get this to work. It returns null 1 1 1 1 when I run it in squiffy. The if statement is straight off the documentation. Thanks.
@set a = 1
@set b = 1
@set c = 1
@set d = 1
{if a=1:{@b+=1,c-=1,d=2,not e}}{else:{@b+=2,c+=2,d=3,e}}
{a}
{b}
{c}
{d}
I'm running Squiffy build 5 on a mac and it definitely does not work there. I just cut and pasted again from your post and it returns
nul 1 1 1 1
It must be a bug then ?
Ok, if I run the code on a browser, Chrome, under windows it works for me too. So then it is a software bug in the compiler under Mac on build 5.
In that case then I can say that on mac build 5 the squiffy.game.go ("section") also does not work !
Hello, it is not a bug per se. The functionality being tested in this thread was first proposed in an earlier forum post. The maintainer of the site and software added that functionality to Squiffy 5.1.2 and to web Squiffy and updated the online documentation. Unfortunately, the most recent desktop build for Mac is 5.0. Also, the download page for Squiffy on textadventures.co.uk is inaccurate. It is platform-dependent what it says, but on a PC it says that version 5.1.2 is available for OS X, which is not the case.
However, a workaround (not a fix) is to write in 5.0 and then compile using the command line version of Squiffy (which is up to date with the new functionality, even on a Mac).
Sorry I don't have the names and links handy for the people/threads mentioned above. I'm on my phone.
Found the earlier thread!
https://textadventures.co.uk/forum/squiffy/topic/nxycd_dd6kuvzyj1tdktfa/suggestiontip-improvement-of-if-statement
Heck yeah, loopernow! Great info!!!
That made me download this:
https://github.com/textadventures/squiffy-editor/archive/master.zip
Then, I followed these steps (took 15 minutes, roundabout):
https://github.com/textadventures/squiffy-editor/blob/master/README.md#squiffy-editor
And now...
Whoo-hoo!
Thanks, loopernow!!!