OnPlayerLogin Problem +rep - 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: OnPlayerLogin Problem +rep (
/showthread.php?tid=560853)
OnPlayerLogin Problem +rep -
Barnwell - 30.01.2015
Hello All i have this problem if this problem has been fixed i will give +rep
Here The Errors:
Code:
C:\Users\Gravelli\Desktop\SAMP-RP\gamemodes\LSRP.pwn(8811) : error 025: function heading differs from
(argument 2)
Here OnPlayerLogin Code:
pawn Code:
stock OnPlayerLogin(playerid, password[])
{
new
sqlQuery[300],
password2 = num_hash(password)
;
format(sqlQuery, sizeof(sqlQuery), "SELECT * FROM samp_users WHERE `Username`='%s' AND `Password`='%d'", GPN(playerid), password2);
mysql_query(sqlQuery, THREAD_LOGIN, playerid);
return 1;
}
Re: OnPlayerLogin Problem +rep -
Youssef221 - 30.01.2015
Can you tell us which code is on line (8811) please?
Re: OnPlayerLogin Problem +rep -
Abagail - 30.01.2015
"THREAD_LOGIN"
That's a weird define for a non-threaded call. You do realize mysql_query is for non-threaded query calls? You should probably be using mysql_tquery for threaded queries.
Re: OnPlayerLogin Problem +rep -
PowerPC603 - 30.01.2015
I guess he uses THREAD_LOGIN as connectionhandle for his connection to mysql.
Mysql_Query has no use for a playerid variable, so remove that and it should be ok.
Re: OnPlayerLogin Problem +rep -
icra - 31.01.2015
Replace mysql_query(sqlQuery, THREAD_LOGIN, playerid);
to mysql_query(sqlQuery, THREAD_LOGIN);