![]() |
help me to remember - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: help me to remember (/Thread-help-me-to-remember) |
RE: help me to remember - mrkarlo - 07-12-2014 07:59 AM please explain me what this Code: +50> > RE: help me to remember - Mordaunt - 07-14-2014 01:22 AM It would be better with some parentheses Quote:IF (<EVAL <EVAL <LOCAL.SKILL> / 10> + 50> > <EVAL <LOCAL.RAND>>) IF (<EVAL (<LOCAL.SKILL> / 10>) + 50> > <EVAL <LOCAL.RAND>>) It's pretty basic math You are adding 50 to whatever local.skill /10 equals. RE: help me to remember - mrkarlo - 07-14-2014 04:17 AM oh thanks. That what I need to know! Code: IF (<LOCAL.SKILL> > 50) 50/10=5 + 50 = 55 ? Hmm RE: help me to remember - Extreme - 07-14-2014 07:53 AM No, 2+2=5 RE: help me to remember - mrkarlo - 07-15-2014 04:23 AM yee, interesting theory ![]() RE: help me to remember - XuN - 07-15-2014 09:25 PM <EVAL <EVAL <LOCAL.SKILL> / 10> + 50> > <EVAL <LOCAL.RAND>>) Each EVAL englobes the values inside, just like using ( )... so everything inside it's brackets will be calc alone, so ... RED = LOCAL.SKILL / 10 TOTAL = <EVAL RED+50> This is important because without using <eval > or () the maths can go weird since they are giving it some 'sense'. In this case yes, result = 55. RE: help me to remember - mrkarlo - 07-16-2014 01:54 AM thank you overlord! I have the last question in this topic. If I want (at least) to lumber only with 75.1 skill - Code: IF (<LOCAL.SKILL> > 50) tell me please, how to calculate? RE: help me to remember - XuN - 07-16-2014 03:27 AM if (<local.skill> > 75) Should do it, I don't know how do you store the local.skill value. RE: help me to remember - mrkarlo - 07-16-2014 04:16 AM LOCAL.SKILL = <SRC.LUMBERJACKING> RE: help me to remember - XuN - 07-16-2014 06:08 PM Then: IF (<local.skill> > 750) |