I'm not 100% sure of your order of operations, but going by PEMDAS I'd say it should look like this:
Last edited by Kileymeister (2013-01-05 15:54:49)
Offline
Wowzers, that's a long equation!
When I am making a long equation like that in Scratch, I usually first put in extra parenthesis that will remind me of the order:
( ( ( ( ((2xLevel+10)/(250*attack)) /((defense*Base power)+2) )*critical hit) * charge) *0.85)-1.00
Then I very carefully put the script together. Usually I would start from the outside parenthesis and go in, so I would start with a
(() - (1.0))block and then go to
((() * (0.85)) - (1.0))and add stuff to make it more complicated from there. When I get to a "hole" that should just have a number or variable in it (instead of another block), I fill it in so I don't get lost.
Last edited by scmb1 (2013-01-05 16:00:29)
Offline