E:\Programming\WSRP\gamemodes\wsrpmysql.pwn(1270) : error 035: argument type mismatch (argument 2) E:\Programming\WSRP\gamemodes\wsrpmysql.pwn(1271) : error 035: argument type mismatch (argument 3)
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'"); strcat(Query, GetPlayerMoney(playerid),GetPVarInt(playerid,"Score"),GetPVarInt(playerid,"Level"),GetPVarInt(playerid,"Helper"),GetPVarInt(playerid,"Vip Level"),GetPlayerSkin(playerid)); format(Query,sizeof(Query),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)); mysql_query(Query);
format(Query,sizeof(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' `Sprunk` = '%d' `Stereo` = '%d' `GoldCoins` = '%d' `PaymentMethod` = '%d' WHERE `Username` = '%s' ",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));
format(Query, sizeof(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', ",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"));
format(Query, sizeof(Query), "%s`Mask`='%d', `GasCan`='%d', `Sprunk`='%d', `Stereo`='%d', `GoldCoins`='%d', `PaymentMethod`='%d' WHERE `Username` = '%s' ",query,GetPVarInt(playerid,"HasMask"),GetPVarInt(playerid,"GasCan"),GetPVarInt(playerid,"HasSprunk"),GetPVarInt("HasStereo"),GetPVarInt(playerid,"GoldCoins"),GetPVarInt(playerid,"PMethod"),GetPlayerNameEx(playerid));
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));
E:\Programming\WSRP\gamemodes\wsrpmysql.pwn(1270) : error 035: argument type mismatch (argument 2) E:\Programming\WSRP\gamemodes\wsrpmysql.pwn(1271) : error 035: argument type mismatch (argument 3)
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'"); strcat(Query, GetPlayerMoney(playerid),GetPVarInt(playerid,"Score"),GetPVarInt(playerid,"Level"),GetPVarInt(playerid,"Helper"),GetPVarInt(playerid,"Vip Level"),GetPlayerSkin(playerid)); format(Query,sizeof(Query),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)); mysql_query(Query);
new name = GetPlayerNameEx(playerid);
Define the GetPVarInt's and names small
eg pawn Код:
|
thanks, i will try this,
Just to be sure, in case this goes wrong, does anyone know whats wrong with the strcat thing? Why does it say argument type mismatch!? |
Like it says, check your second param and the third param at line 1270 and 1271.
|
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'");
strcat(Query,GetPlayerMoney(playerid),GetPVarInt(playerid,"Score"),GetPVarInt(playerid,"Level"),GetPVarInt(playerid,"Helper"),GetPVarInt(playerid,"Vip Level"),GetPlayerSkin(playerid));
format(Query,sizeof(Query),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));
mysql_query(Query);
I did, but i can't find anything wrong.. thats the problem.
I mean, this is the right syntax when using strcat right? pawn Код:
|