[Ayuda] Con Este Error... - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (
https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [Ayuda] Con Este Error... (
/showthread.php?tid=381257)
[Ayuda] Con Este Error... -
OTACON - 29.09.2012
Buenas a Todos, Tengo un error con la funcion
isNumeric y no se ke puede se yo lo veo bien a la Linea y a la linea anterior :S
Error:
pawn Код:
error 035: argument type mismatch (argument 1)
Linea
pawn Код:
if(!isNumeric(Dinero)) return 1;
Funcion:
pawn Код:
stock isNumeric(const string[])
{
new length=strlen(string);
if (length==0) return false;
for (new i = 0; i < length; i++)
{
if (
(string[i] > '9' || string[i] < '0' && string[i]!='-' && string[i]!='+') // Not a number,'+' or '-'
|| (string[i]=='-' && i!=0) // A '-' but not at first.
|| (string[i]=='+' && i!=0) // A '+' but not at first.
) return false;
}
if (length==1 && (string[0]=='-' || string[0]=='+')) return false;
return true;
}
Dinero esta definido asi =
Dinero = strval(params[1]);
Desde ya muchas Gracias.
Respuesta: [Ayuda] Con Este Error... -
CaptainMactavish - 29.09.2012
Dinero tiene que ser una string, y por lo que veo Dinero es una variable integer.
Con respecto al error: error 035: argument type mismatch (argument 1).
Deberнas intentar interpretar que significa, en este caso el tipo de variable que pusiste en esa funciуn(Dinero) no concuerda con el tipo que tiene definido en la funciуn, o sea una string.
Respuesta: [Ayuda] Con Este Error... -
Jovanny - 29.09.2012
pawn Код:
if(!isNumeric(params[1])) return 1;
Respuesta: [Ayuda] Con Este Error... -
OTACON - 29.09.2012
Hay esta

.
Gracias a Los dos

.