"-identifier-", but found "-integer value-" - 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: "-identifier-", but found "-integer value-" (
/showthread.php?tid=359286)
"-identifier-", but found "-integer value-" -
gedramens - 13.07.2012
I was just playing around with some MySql registration script and I got unexpected errors:
Код:
C:\Users\Giedrius\Desktop\samp server\gamemodes\001.pwn(130) : error 001: expected token: "-identifier-", but found "-integer value-"
C:\Users\Giedrius\Desktop\samp server\gamemodes\001.pwn(131) : error 001: expected token: "-identifier-", but found "-integer value-"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
The code is:
Код:
public OnPlayerDisconnect(playerid, reason)
{
if(Logged[playerid] == 1)
{
new score = GetPlayerScore(playerid); //line 130
new money = GetPlayerMoney(playerid); //line 131
new query[200], pname[24];
GetPlayerName(playerid, pname, 24);
format(query, sizeof(query), "UPDATE playerdata SET score=%d, money=%d WHERE user='%s'", score, money, pname);
mysql_query(query);
}
return 1;
}
How can I fix this ?