1 Reply Latest reply on Nov 12, 2014 10:14 PM by resdesign

    Help with nested If statements


      Hello, I'm trying to get my piece of code working in Edage Animate however I have no idea what's wrong with it.


      I have two variables in the stage under compositionready which are

      op1stat = 0

      op2stat = 0


      I also have two multichoice buttons that set either op1stat/op2stat to a 1 which are working correctly. However I am having difficulty with the nested if statements when equal to 1, whatever string that was previously in "textbot" should be replaced with the string in the code.


      else if (total==37)



          sym.getSymbol("multichoice").getSymbol("op1").$("op1text").html("Buy something");


          if (op1stat==1)


               sym.getSymbol("interfacebot").$("textbot").html("YOU BUY SOMETHING");


           else if (op2stat==1)


               sym.getSymbol("interfacebot").$("textbot").html("YOU CONTINUE");