webpro 31 Posted January 25, 2014 Report Share Posted January 25, 2014 Is there a way to increment more than by + 1 ? Let's say 20, so http://www.site.com/url=20http://www.site.com/url=40http://www.site.com/url=60etc.. I'm trying various things but i can't get it to work ?I'm stuck at doing:http://www.site.com/url=20http://www.site.com/url=21http://www.site.com/url=22 Thanks Quote Link to post Share on other sites
UBotDev 276 Posted January 25, 2014 Report Share Posted January 25, 2014 Command for such increment doesn't exist, but whats wrong with add function? set(#RESULT, $add(#RESULT, 20), "Global") Quote Link to post Share on other sites
webpro 31 Posted January 25, 2014 Author Report Share Posted January 25, 2014 Odd, ain't working ? I guess i'll try to reboot. In fact, i got a couple of UI's which don't work. Like check/uncheck that aren't working. Thanks by the way Quote Link to post Share on other sites
UBotDev 276 Posted January 25, 2014 Report Share Posted January 25, 2014 Odd, ain't working ? I guess i'll try to reboot. In fact, i got a couple of UI's which don't work. Like check/uncheck that aren't working. Thanks by the wayIt should be working, make sure to set #RESULT to initial value. I also started to experience that with v4. :/ Quote Link to post Share on other sites
webpro 31 Posted January 26, 2014 Author Report Share Posted January 26, 2014 Thanks mate ! Yeah odd huh ? It's with UB4 on my end as well ? (As i ain't doing much for now with 5) Quote Link to post Share on other sites
MiriamMB 63 Posted January 27, 2014 Report Share Posted January 27, 2014 The first set command is basically setting #RESULT to the same value over and over again and then adding 20 each time you run it. As Ed put it mathematically, it is basically where x = #RESULT: x = 20x = x + 20 And when you run the set command again, it will set #RESULT to 20 again and then increment by 20 and the result will keep being 40. What you can do is to set #RESULT to a value to begin with. set(#RESULT, 20, "Global") After that, you can add the set command that was suggested by UBotDev: set(#RESULT, $add(#RESULT, 20), "Global") You will need to make sure that you only run the first set command once, to set #RESULT to 20. If you separate the two commands in two script tabs, that helps you control that. So run the first tab once, and then when you run second tab, it will increment #RESULT by 20 after each run. I've attached an example script that should help demonstrate it. Hope it's helpful. Quote Link to post Share on other sites
BeerNut 25 Posted March 3, 2014 Report Share Posted March 3, 2014 I was doing something similiar but I have been finding the ADD and SUBTRACT options in uBot absolutely would not work. I had this problem on my laptop but they worked on my desktop. No clue why but math has been buggy so I avoided it. Also on v4. Basicly what I did was just make a loop with the increment, i loop 10 or 20 times whatever I need so it counts up. Quote Link to post Share on other sites
UBotDev 276 Posted March 3, 2014 Report Share Posted March 3, 2014 I was doing something similiar but I have been finding the ADD and SUBTRACT options in uBot absolutely would not work. I had this problem on my laptop but they worked on my desktop. No clue why but math has been buggy so I avoided it. Also on v4. Basicly what I did was just make a loop with the increment, i loop 10 or 20 times whatever I need so it counts up. I've never had such problems and it always worked for me. Are you sure that's the case? I would double check the code and submit a bug/issue if that's true. 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.