I changed the pow(10,[email protected]+1) to (10 ** [email protected]+1) but this got me some issues when i buy some Items from the NPC and the Item Count in text is wrong.
If i use the Pow(10,[email protected]+1) then it works but the console says deprecated.
Hey there, i use the Shop System whish i found here in herc.
If i Use this System, the server says that "pow" will be removed in future und is deprecated.
How i can fix it without getting issues in NPC Text and Function?
function ValueConvert { set [email protected], atoi(""+getarg(0)); if ( [email protected] == 0 || [email protected] >= 2147483647 ) return getarg(0); set [email protected], getstrlen(""[email protected]); for ( set [email protected],0; [email protected] < [email protected]; set [email protected], [email protected] + 1 ) { set [email protected]$, [email protected] % pow(10,[email protected]+1) / pow(10,[email protected]) + [email protected]$; if ( ([email protected]+1) % 3 == 0 && [email protected]+1 != [email protected] ) set [email protected]$, ","+ [email protected]$; } return [email protected]$; }
I changed the pow(10,[email protected]+1) to (10 ** [email protected]+1) but this got me some issues when i buy some Items from the NPC and the Item Count in text is wrong.
If i use the Pow(10,[email protected]+1) then it works but the console says deprecated.
How i can fix this?
Share this post
Link to post
Share on other sites