SQLite problem
#1

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!
Reply
#2

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)
Reply
#3

THANKS, +rep for you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)