Didnt got the Syntax of If
Schlauewurst
10 Feb 2016, 16:59So i wrote my code:
So what shall i write after the "if", in old languages we used than, but i think i just need the javescript code
??
I just want to add 2 to "tech" if the "farbe" is "blauen"
Du findest dich in einem Gefäß aus Glas wieder, das Gefüllt ist mit einer {rotate farbe:grünen:blauen:gelben} Flüßigkeit
+++{label:w=weiter}
@replace w=
if (squiffy.get("farbe") == "blauen": @inc tech 2
if (squiffy.get("farbe") == "grünen": @inc bio 2
if (squiffy.get("farbe") == "gelben": @inc def 2 @inc off 2
So what shall i write after the "if", in old languages we used than, but i think i just need the javescript code
if (squiffy.get("farbe") == "blauen": (squiffy.get("tech"+2)
??
I just want to add 2 to "tech" if the "farbe" is "blauen"
if (squiffy.get("farbe") == "blauen") {squiffy.get("tech")= squiffy.get("tech") +2}
IFforClassroom
14 Feb 2016, 14:47I don't speak German, so I don't know what you want to do with the label w. However, this may help:
Du findest dich in einem Gefäß aus Glas wieder, das Gefüllt ist mit einer {rotate farbe:grünen:blauen:gelben} Flüßigkeit [[New Section]]
[[New Section]]:
{if farbe=blauen:[New Passage1]}{if farbe=grünen:[New Passage2]}{if farbe=gelben:[New Passage 3]}
[New Passage1]:
@inc tech 2
Your text
[New Passage2]:
@inc bio 2
Your text
[New Passage3]:
@inc def 2
@inc off 2
Your text
Remember that Squiffy is pretty good for non-programmers like me. May be confusing for real programmers.
Du findest dich in einem Gefäß aus Glas wieder, das Gefüllt ist mit einer {rotate farbe:grünen:blauen:gelben} Flüßigkeit [[New Section]]
[[New Section]]:
{if farbe=blauen:[New Passage1]}{if farbe=grünen:[New Passage2]}{if farbe=gelben:[New Passage 3]}
[New Passage1]:
@inc tech 2
Your text
[New Passage2]:
@inc bio 2
Your text
[New Passage3]:
@inc def 2
@inc off 2
Your text
Remember that Squiffy is pretty good for non-programmers like me. May be confusing for real programmers.