26.05.2010, 22:18
Quote:
Originally Posted by hanzen
Ok.. OnPlayerUpdate() is suppose to update som data in the database. I run this, but it wont insert into the table.
Код:
new query[256]; format(query, sizeof(query), "UPDATE players SET money = '%d', level = '%d', admin = '%d', skin = '%d', bank = '%d' WHERE name = '%s'",PlayerInfo[playerid][pMoney], PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pBank]), PlayerInfo[playerid][pName]; mysql_query(query, SQLPtr); |
Edit:
The problem with the second one is that the ")" is in the wrong place.
BTW: is "PlayerInfo[playerid][pAdmin]" a string or an integer? Im thinking its a string, as you already have a variable for admin level, so change the corresponding %d's into %s's.