SA-MP Forums Archive
isNumeric - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: isNumeric (/showthread.php?tid=512548)



isNumeric - hillko - 11.05.2014

C:\Users\User\Desktop\609_1031-FS-rRace_v\rRace_v02a Rus\filterscripts\rRace.pwn(376) : error 017: undefined symbol "isNumeric"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


Код HTML:
	        if(isNumeric(inputtext))



Re: isNumeric - PrivatioBoni - 11.05.2014

It's meant to be "IsNumeric" (note case)


Re : isNumeric - ReD_HunTeR - 11.05.2014

pawn Код:
stock isNumeric(string[])
{
    for (new i = 0, j = strlen(string); i < j; i++)
    {
        if (string[i] > '9' || string[i] < '0') return 0;
    }
    return 1;
}
add this to somewhere then try to compile...


Re: isNumeric - Beckett - 11.05.2014

it's IsNumeric not isNumeric I guess.


Re: Re : isNumeric - hillko - 11.05.2014

Quote:
Originally Posted by BlackBomb
Посмотреть сообщение
pawn Код:
stock isNumeric(string[])
{
    for (new i = 0, j = strlen(string); i < j; i++)
    {
        if (string[i] > '9' || string[i] < '0') return 0;
    }
    return 1;
}
add this to somewhere then try to compile...
added in the end of the script, nothing has changed as usual error writing!


Re: isNumeric - hillko - 11.05.2014

understood, thank you all


Re: isNumeric - PrivatioBoni - 11.05.2014

hillko, did you actually try IsNumeric as suggested?
EDIT: Disregard as per above post.


Re : isNumeric - ReD_HunTeR - 11.05.2014

Sorry one thing,
remove that, that i tell before and try this it will work:-

pawn Код:
stock isNumeric(string[]) //your format is is i maked that Is so now try
{
    for (new i = 0, j = strlen(string); i < j; i++)
    {
        if (string[i] > '9' || string[i] < '0') return 0;
    }
    return 1;
}