![]() |
Exp_GetVal: Divide by 0 - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Exp_GetVal: Divide by 0 (/Thread-Exp-GetVal-Divide-by-0) |
Exp_GetVal: Divide by 0 - Russian - 12-30-2012 11:50 PM Code: 17:45:ERROR:(e_startx.scp,1079)Undefined symbol '' Script: Code: IF <SRC.ISPLAYER> RE: Exp_GetVal: Divide by 0 - Shaklaban - 12-31-2012 12:58 AM Try without % character. RE: Exp_GetVal: Divide by 0 - Mordaunt - 12-31-2012 01:28 AM Your problem here is dtag0. tag0 is to see if the tag is there. dtag gives you the integer value of a tag dtag0 will force an integer even if there is no tag, which causes the error because the result of the equation is too small If there's is the possibility of that tag not existing use eval or put it inside an if statement to check it exists before running the line containing the qval. Code: IF <SRC.ISPLAYER> RE: Exp_GetVal: Divide by 0 - Ben - 12-31-2012 05:24 AM Shak is on the right track here. This has nothing to do with the TAG0. In fact, TAG0 is properly used in this situation. If you look closely, there is no equations in this script, but since % is the modulus sign, an equation is created deviding <SRC.DTAG0.BONUSRESISTANCE_PARALYZE> by a string, which is a big NO NO! You need to find a way to make % as part of the string. RE: Exp_GetVal: Divide by 0 - Mordaunt - 12-31-2012 05:49 AM Oddly having played with a "similar" line in a test function on my server, i don't get any kind of errors and the % is taken as part of the string and displayed in the message.... My Test: Code: [function 1] set the tags to whatever you want... the output to the screen when you do .1 is as written in the function. As a sysmessage it is a string and displayed as such unless the variable is taken from within <> Given that % is not within the brackets it is part of the string. I can't see why this does not work as written, it certainly does for me RE: Exp_GetVal: Divide by 0 - Shaklaban - 12-31-2012 08:18 AM i think problem can be the font and %, if you add the @ font thing to the sysmessage probably it will give the same error: PHP Code: [function 1] RE: Exp_GetVal: Divide by 0 - Mordaunt - 12-31-2012 08:40 AM Nope... I even ran the line he has, no errors at all. I'm thinking that he edited the mistake out of the original post. The only thing that gives me any kind of issue is the Cyrillic, I can't make that output at all, though that is likely down to regional alphabet settings on the computer running the scripts. I can't imagine every Russian server out there is unable to use their native language. |