mdc101 15 Posted February 16, 2014 Report Share Posted February 16, 2014 Hi GuysAnyone having an issue with the eval multiply reults?I get odd results like "8.73e+006" The eval math function is not working.A basic math sum like 873000 * 10 = 8.73e+006It should be 8730000 Im sure it not the code. Started happening since 5.7 updateIs it just me or is there an actual bug? if($comparison($scrape attribute($element offset(<style="text-align: right">, 0), "innertext"), "=", $nothing)) {then {set(#Psys_ptkw_cmp, 0, "Global")set(#Psys_ptkw_cmp, 2000000, "Global")set(#Psys_ptkw_cmp, $replace($trim(#Psys_ptkw_cmp), ",", $nothing), "Global")set(#Psys_ptkw_ceiling, $nothing, "Global")set(#Psys_ptkw_ceiling, $eval($multiply(#Psys_ptkw_cmp, #Psys_ptkw_ceiling)), "Global")}else {set(#Psys_ptkw_cmp, 0, "Global")set(#Psys_ptkw_cmp, $scrape attribute($element offset(<style="text-align: right">, 0), "innertext"), "Global")set(#Psys_ptkw_cmp, $replace($trim(#Psys_ptkw_cmp), ",", $nothing), "Global")set(#Psys_ptkw_ceiling, $nothing, "Global")set(#Psys_ptkw_ceiling, $eval($multiply(#Psys_ptkw_cmp, #Psys_Drill_ceiling)), "Global")}} Quote Link to post Share on other sites
Kev 69 Posted February 16, 2014 Report Share Posted February 16, 2014 Eval did have problems in v5 and was added to the tracker. Not sure if it was resolved or not yet in the latest release. Quote Link to post Share on other sites
mdc101 15 Posted February 16, 2014 Author Report Share Posted February 16, 2014 Hi Kev Any work arounds? Quote Link to post Share on other sites
UBotDev 276 Posted February 16, 2014 Report Share Posted February 16, 2014 The reason you get that instead of a whole number is computer accuracy...the problem is that some numbers are too large to write them with digits only, that's why exponent is used. Refer to this page: http://en.wikipedia.org/wiki/Floating_point So, you won't be able to get a number consisting of digits only if your number is high, you'll always get exponent. Quote Link to post Share on other sites
mdc101 15 Posted February 17, 2014 Author Report Share Posted February 17, 2014 Thanks for the reply.This is so annoyingso why was it working before the update to 5.7.I working with competing pages and I use the the competing pages number x 10 as a ceiling for me to do analysis.I have never had this issue in the last 4 years and now that I need the functionality at a critical point in a project the update stuffs up the math functions. Is there a way to calculate the number I need using JavaScript? Quote Link to post Share on other sites
mdc101 15 Posted February 17, 2014 Author Report Share Posted February 17, 2014 Found a work aroundI only used multiply.I removed the $eval() and it worked Quote Link to post Share on other sites
Enigma 78 Posted January 16, 2015 Report Share Posted January 16, 2015 It has issues in uBot v4 as well, see here http://www.ubotstudio.com/forum/index.php?/topic/17490-bug-eval-does-not-work-in-ubot-4220/ 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.