argument type mismatch (argument 1) - 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: argument type mismatch (argument 1) (
/showthread.php?tid=417902)
argument type mismatch (argument 1) -
Noles2197 - 22.02.2013
Код:
(32) : warning 219: local variable "password" shadows a variable at a preceding level
(35) : error 035: argument type mismatch (argument 1)
(32) : warning 203: symbol is never used: "password"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
pawn Код:
stock LoginPlayer(playerid,const password[]) // line 32
{
new Query[80],Escaped[60];
mysql_real_escape_string(password,Escaped); // line 35
format(Query,sizeof(Query),"SELECT * FROM `stats` WHERE `user` = '%s' AND `password` = '%s'",GetName(playerid),Escaped);
mysql_query(Query);
mysql_store_result();
if(mysql_num_rows() != 0)
{
SendClientMessage(playerid,-1,"You have been logged in!");
LoadStats(playerid);
}
else
{
SendClientMessage(playerid,-1,"Wrong password!");
Kick(playerid);
}
mysql_free_result();
return 1;
}
Re: argument type mismatch (argument 1) -
Bakr - 23.02.2013
Either delete the global "password" variable if it is not being used or change the parameter name in the LoginPlayer function.