SQLite problem - 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: SQLite problem (
/showthread.php?tid=357549)
SQLite problem -
zombieking - 07.07.2012
Hello! So here is my problem:
The code:
pawn Код:
format(Query,sizeof(Query),"UPDATE `USERS` SET BANKCASH = '%d', CASH = '%d', ADMINLEVEL = '%d', SPAWN = '%d', LEVEL = '%d', EXP = '%d', JOB = '%d', FACTION = '%d', FACTIONLEADER = '%d', SKIN = '%d' WHERE `NAME` = '%s' COLLATE NOCASE",pStats[playerid][BankCash],
pStats[playerid][Money],pStats[playerid][AdminLevel],pStats[playerid][Spawn],pStats[playerid][Level],pStats[playerid][EXP],pStats[playerid][Job],pStats[playerid][Faction],pStats[playerid][FactionLeader],pStats[playerid][Skin],GetPlayerName(playerid));
Which is split in multiple lines because it was too long.
Gives me this warning:
pawn Код:
warning 202: number of arguments does not match definition
After removing that code the warning disappeared so the error is ON that lines.
Thanks in advance!
Re: SQLite problem -
coole210 - 07.07.2012
You are using GetPlayerName wrong.
https://sampwiki.blast.hk/wiki/GetPlayerName
You are using it like this: GetPlayerName(playerid)
Supposed to be like this: GetPlayerName(playerid, const name[], len)
Example:
pawn Код:
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
//Then use "name" instead of GetPlayerName(playerid)
Re: SQLite problem -
zombieking - 07.07.2012
THANKS, +rep for you