zenos 13 Posted March 5, 2014 Report Share Posted March 5, 2014 Hello everybody is it possible to increment a variable (#compte0 #compte1 etc...) in a loop like this : set(#inc, 0, "Global") loop(4) { if($comparison("#compte{#inc}", "=", "true")) { then { alert("ok") } else { alert("dead") } } increment(#inc) } I have tried with the Free bulk reset plugin but I must miss something... This is making me crasy, if someone would please help me ? Quote Link to post Share on other sites
UBotBuddy 331 Posted March 5, 2014 Report Share Posted March 5, 2014 @zenos Try this on for size. set(#inc, 0, "Global") loop(4) { if($comparison(#inc, "=", 2)) { then { alert("inc is equal to 2") } else { } } increment(#inc) } Yes, you can increment variables within a Loop but not in the comparison area of the IF node. Use that area for doing an actual comparison. Buddy Quote Link to post Share on other sites
zenos 13 Posted March 5, 2014 Author Report Share Posted March 5, 2014 Thanks for your answer I know how to use comparison, but I really need to dynamcly increment a var like this and to use the comparison to check if my var is true or not... #Compte0#Compte1Etc.... So after that I need to check if #Compte0 is true or false, #Compte1 is true or false, etc... Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted March 6, 2014 Report Share Posted March 6, 2014 use the Dictionary plugin you can use dynamic variables Quote Link to post Share on other sites
zenos 13 Posted March 6, 2014 Author Report Share Posted March 6, 2014 use the Dictionary plugin you can use dynamic variablesThank you but I just don't know how to do it with Dictionnary, if you would please help me that would be really nice... Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.