Enigma 78 Posted January 16, 2015 Report Share Posted January 16, 2015 I'm trying to $eval something but the variable i Set remains empty. Now when i even try a simple math it doesn't do antyhing. set(#test, $eval($subtract(7, 3)), "Global") Using uBot 4.2.20 -. I enabled/disabled JS, both don't work-. I restarted uBot and tried into a new script, don't work. Does anyone experience the same issue???? Quote Link to post Share on other sites
arunner26 51 Posted January 16, 2015 Report Share Posted January 16, 2015 Enigma,I tried your command above in uBot 4.2.20 and it worked fine for me. Quote Link to post Share on other sites
Marton 48 Posted January 16, 2015 Report Share Posted January 16, 2015 In some cases it won't work that way. Remove $eval! You don't need it! Use $subtract only! set(#test, $subtract(7, 3), "Global") Marton Quote Link to post Share on other sites
Enigma 78 Posted January 16, 2015 Author Report Share Posted January 16, 2015 Thanks for the replies guys. @marton i will try your solution @arunner26 then i have no clue why it does not work for me!I have contacted uBot support regarding this.There are more people having issues with $eval i saw in a few threads.The numbers i am trying to eval are just normal numbers, no floating or any serious calculation stuff.just i.e. 748-47 or 351-96 kinda stuff.very basic calculations. Quote Link to post Share on other sites
arunner26 51 Posted January 16, 2015 Report Share Posted January 16, 2015 Enigma,I agree with Marton in this case. I would just use the native UBOT commands for math.I just figured you had a particular reason why you wanted to use java.I know a lot of people are experts in java and want to use it. I have never needed it in my bots. Quote Link to post Share on other sites
Enigma 78 Posted January 16, 2015 Author Report Share Posted January 16, 2015 Enigma,I agree with Marton in this case. I would just use the native UBOT commands for math.I just figured you had a particular reason why you wanted to use java.I know a lot of people are experts in java and want to use it. I have never needed it in my bots. I thought that's the way to do math in uBot. Ok i just noticed that when you just type 1-1 ubot automatically set it as math (unless you quote it of course). Thanks guys for the input...Still wondering why $eval doesn't work as it suppose to work... Quote Link to post Share on other sites
arunner26 51 Posted January 16, 2015 Report Share Posted January 16, 2015 Enigma said: "So basically you must use $eval and then digg into source mode and remove the $eval part."Actually if you just type 7-3 into the "New Value:" field of a SET command then UBOT will write a subtract for you and you get the code below: set(#test, $subtract(7, 3), "Global") Quote Link to post Share on other sites
Enigma 78 Posted January 16, 2015 Author Report Share Posted January 16, 2015 Enigma said: "So basically you must use $eval and then digg into source mode and remove the $eval part."Actually if you just type 7-3 into the "New Value:" field of a SET command then UBOT will write a subtract for you and you get the code below: set(#test, $subtract(7, 3), "Global") That's what i said in my previous reply Quote Link to post Share on other sites
arunner26 51 Posted January 16, 2015 Report Share Posted January 16, 2015 Enigma,Yes, you did say that because I was quoting you.I was saying you do NOT need to digg into the source code to make changes. Just type 7-3 in the SET and UBOT does the rest. Quote Link to post Share on other sites
pftg4 102 Posted January 16, 2015 Report Share Posted January 16, 2015 you are navigating to a site that has javascript installed first because you can only use javascript after that just an fyi Quote Link to post Share on other sites
Enigma 78 Posted January 16, 2015 Author Report Share Posted January 16, 2015 you are navigating to a site that has javascript installed first because you can only use javascript after that just an fyi Did you read post #1? -. I enabled/disabled JS, both don't work Quote Link to post Share on other sites
Enigma 78 Posted January 16, 2015 Author Report Share Posted January 16, 2015 Enigma,Yes, you did say that because I was quoting you.I was saying you do NOT need to digg into the source code to make changes. Just type 7-3 in the SET and UBOT does the rest. Relaxed bro, no offence Quote Link to post Share on other sites
arunner26 51 Posted January 16, 2015 Report Share Posted January 16, 2015 I'm always very relaxed, thanks and no offense taken. Quote Link to post Share on other sites
UBotDev 276 Posted January 16, 2015 Report Share Posted January 16, 2015 I'm trying to $eval something but the variable i Set remains empty. Now when i even try a simple math it doesn't do antyhing. set(#test, $eval($subtract(7, 3)), "Global") Using uBot 4.2.20 -. I enabled/disabled JS, both don't work-. I restarted uBot and tried into a new script, don't work. Does anyone experience the same issue????As you figured out you don't need eval there, but pftg4 still has a point. you are navigating to a site that has javascript installed first because you can only use javascript after that just an fyi Right, you need to have JavaScript/JQuery loaded in browser for $eval command to work, else it will jsut return a blank string. 1 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.