17.04.2012, 14:27
Regardless of whether or not the query in itself works, the problem is, as it states, that line is too long.
To split it up you could use a function such as strcat like so:
To split it up you could use a function such as strcat like so:
pawn Код:
new Query[5000]; // however big you require this variable to be
strcat(Query,"UPDATE `Users` SET `Money` = '%d' `Level` = '%d' `Admin` = '%d' `Helper` = '%d' `VipLevel` = '%d' `Skin` '%d' `Kills` = '%d' `Deaths` = '%d' `Muted` = '%d' `Cell` = '%d' `Cigs` = '%d' `Watch` = '%d' `Mask` = '%d' `GasCan` = '%d'");
strcat(Query," `Sprunk` = '%d' `Stereo` = '%d' `GoldCoins` = '%d' `PaymentMethod` = '%d' WHERE `Username` = '%s'");
format(Query,sizeof(Query),Query,GetPlayerMoney(playerid),GetPVarInt(playerid,"Score"),GetPVarInt(playerid,"Level"),GetPVarInt(playerid,"Helper"),GetPVarInt(playerid,"Vip Level"),GetPlayerSkin(playerid),GetPVarInt(playerid,"Kills"),GetPVarInt(playerid,"Deaths"),GetPVarInt(playerid,"Muted"),GetPVarInt(playerid,"HasCellphone"),GetPVarInt(playerid,"HasCigs"),GetPVarInt(playerid,"HasWatch"),GetPVarInt(playerid,"HasMask"),GetPVarInt(playerid,"GasCan"),GetPVarInt(playerid,"HasSprunk"),GetPVarInt("HasStereo"),GetPVarInt(playerid,"GoldCoins"),GetPVarInt(playerid,"PMethod"),GetPlayerNameEx(playerid));