irevvy 0 Posted March 20, 2013 Report Share Posted March 20, 2013 Is there a work around as to how to convert a string variable to integer from UI text box or drop down? I am trying to create a script that will loop for a number of times which will be determined by the user input via text box or drop down. I always get this error when I run it "Conversion from string "" to type 'Integer' is not valid." Your help is highly appreciated! Quote Link to post Share on other sites
Lucius 7 Posted March 20, 2013 Report Share Posted March 20, 2013 There's most likely an error in your code. Quote Link to post Share on other sites
irevvy 0 Posted March 22, 2013 Author Report Share Posted March 22, 2013 Here's my code: ui drop down("No. of Loops", "3,5,8,10,15", #cycle)set(#loopcounter, 0, "Global")loop(#cycle) { increment(#loopcounter) alert(#loopcounter)} Thanks! Quote Link to post Share on other sites
magoo 31 Posted March 22, 2013 Report Share Posted March 22, 2013 I don't see any errors when running the code you posted above. I take it that the actual code that is receiving an error is different than this code?? usually you would increment the loop after it has run its cycle, not as it starts the cycle. Quote Link to post Share on other sites
irevvy 0 Posted March 23, 2013 Author Report Share Posted March 23, 2013 That's weird! That's the same code I tested when I got the error and I tried it several times. Apparently, when I updated Ubot today the error doesn't show up anymore. Anyway, thanks for your help guys! 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.