SA-MP Forums Archive
[SOLVED]Help with IsNumeric , Gives Error - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SOLVED]Help with IsNumeric , Gives Error (/showthread.php?tid=140532)



[SOLVED]Help with IsNumeric , Gives Error - Micko9 - 09.04.2010

Error Line
pawn Код:
if (IsNumeric(strval(params)))
IsNumeric Code :

pawn Код:
IsNumeric(const string[])
{
for (new i = 0, j = strlen(string); i < j; i++)
{
if (string[i] > '9' || string[i] < '0') return 0;
}
return 1;
}
error :
Код:
(112) : error 035: argument type mismatch (argument 1)



Re: Help with IsNumeric , Gives Error - klaukas - 09.04.2010

The argument that you pass is different from the argument that the
function expects, and the compiler cannot convert the passed-in
argument to the required type.


Re: Help with IsNumeric , Gives Error - Micko9 - 09.04.2010

Quote:
Originally Posted by Kaju
The argument that you pass is different from the argument that the
function expects, and the compiler cannot convert the passed-in
argument to the required type.
how to fix it?

my new code :
pawn Код:
new amout=strval(params);



Re: Help with IsNumeric , Gives Error - ZeRo_HUN - 09.04.2010

pawn Код:
if( IsNumeric( params ) )



Re: Help with IsNumeric , Gives Error - Micko9 - 09.04.2010

Quote:
Originally Posted by ZeRo_HUN
pawn Код:
if( IsNumeric( params ) )
ty