OnPlayerLogin Problem +rep
#1

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;
}
Reply
#2

Can you tell us which code is on line (8811) please?
Reply
#3

"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.
Reply
#4

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.
Reply
#5

Replace mysql_query(sqlQuery, THREAD_LOGIN, playerid);
to mysql_query(sqlQuery, THREAD_LOGIN);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)