format(string,sizeof(string), "UPDATE `Accounts` SET `AdminLevel` = %i,`Money` = %i, `Bank` = %i, `Faction` = %i, `Rank` = %i, `HouseKey` = %i, `BizKey` = %i, `Skin` = %i, `Spawn1` = '%f', `Spawn2` = '%f', `Spawn3` = '%f', `Spawn4` = '%f', `Spawn5` = %i, `Reg` = %i, `Sex` = %i, `Wallet` = %i, `Renting` = %i, `Products` = %i, `PhoneNumber` = %i, `Minutes` = %i, `Spawn6` = %i, `Arrested` = %i, `Prisoned` = %i, `Jailed` = %i, `JailTime` = %i, \ `Cell` = %i, `Towe` = %i, `License` = %i, `Linked` = %i, `ForumName` = '%s', `ForumPassword` = '%s', `wLicense` = %i, `Job` = %i, `Donator` = %i, `CarParts` = %i, `PlayingTime` = %i, `FightingStyle` = %i WHERE `Name` = '%s'",
error 075: input line too long (after substitutions) error 037: invalid string (possibly non-terminated string) error 017: undefined symbol "UPDATE" error 029: invalid expression, assumed zero fatal error 107: too many error messages on one line |
new mysql[128];
format(mysql, sizeof(mysql), "UPDATE `Accounts` SET `AdminLevel`='%i'",PlayerData); // Your ENUM configuration.
mysql_query(mysql); // Use yours ...
format(mysql, sizeof(mysql), "UPDATE `Accounts` SET `Money`='%i'",PlayerData); // Your ENUM configuration.
mysql_query(mysql); // Use yours ...
format(mysql, sizeof(mysql), "UPDATE `Accounts` SET `Bank`='%i'",PlayerData); // Your ENUM configuration.
mysql_query(query); // Use yours ...
format(mysql, sizeof(mysql), "UPDATE `Accounts` SET `Faction`='%i'",PlayerData); // Your ENUM configuration.
mysql_query(mysql); // Use yours ...
You need to split them, example:
pawn Код:
|
format(string,sizeof(string), "UPDATE `Accounts` SET `AdminLevel` = %i,`Money` = %i, `Bank` = %i, `Faction` = %i, `Rank` = %i, `HouseKey` = %i, `BizKey` = %i, `Skin` = %i, `Spawn1` = '%f', `Spawn2` = '%f', `Spawn3` = '%f', `Spawn4` = '%f', `Spawn5` = %i, `Reg` = %i, `Sex` = %i, `Wallet` = %i, `Renting` = %i, `Products` = %i, `PhoneNumber` = %i, `Minutes` = %i, `Spawn6` = %i, `Arrested` = %i, `Prisoned` = %i, `Jailed` = %i, `JailTime` = %i, \ `Cell` = %i, `Towe` = %i, `License` = %i, `Linked` = %i, `ForumName` = '%s', `ForumPassword` = '%s', `wLicense` = %i, `Job` = %i, `Donator` = %i, `CarParts` = %i, `PlayingTime` = %i, `FightingStyle` = %i WHERE `Name` = '%s'", AccountData[playerid][AdminLevel],GetPlayerCash(playerid),AccountData[playerid][Bank], AccountData[playerid][Faction],AccountData[playerid][Rank],AccountData[playerid][HouseKey], AccountData[playerid][BizKey],GetPlayerSkin(playerid),AccountData[playerid][Spawn][0],AccountData[playerid][Spawn][1],AccountData[playerid][Spawn][2],AccountData[playerid][Spawn][3], AccountData[playerid][InteriorSpawn],AccountData[playerid][Reg],AccountData[playerid][Sex],GetPlayerWalletCash(playerid),AccountData[playerid][Renting],AccountData[playerid][Products], AccountData[playerid][PhoneNumber],AccountData[playerid][Minutes],AccountData[playerid][WorldSpawn],AccountData[playerid][Arrested],AccountData[playerid][Prisoned],AccountData[playerid][Jailed], AccountData[playerid][JailTime],AccountData[playerid][Cell],AccountData[playerid][Towe],AccountData[playerid][License], AccountData[playerid][Linked], AccountData[playerid][ForumName], AccountData[playerid][ForumPassword],AccountData[playerid][wLicense],AccountData[playerid][pJob], AccountData[playerid][Donator], AccountData[playerid][CarParts], AccountData[playerid][PlayingTime], AccountData[playerid][FightingStyle],GetUserName(playerid)); mysql_query(string, MYSQL_SAVE_USERS);
Theres actually no need to do that. I tested his code with what he gave with no errors. You don't need to do that many query's......
|
Originally Posted by Kaylux
Theres actually no need to do that. I tested his code with what he gave with no errors. You don't need to do that many query's......
|