Error help: -
iGetty - 18.01.2012
Код:
(2156) : error 075: input line too long (after substitutions)
(2157) : error 037: invalid string (possibly non-terminated string)
(2157) : error 017: undefined symbol "UPDATE"
(2157) : error 029: invalid expression, assumed zero
(2157) : fatal error 107: too many error messages on one line
pawn Код:
format(Query, sizeof(Query), "UPDATE `playerinfo` SET `kills` = %d, `deaths` = %d, `money` = %d, `AdminLevel` = %d, `Skin` = %d, `Last Pos X` = %f, `Last Pos Y` = %f, `Last Pos Z` = %f, `Interior` = %d, `DonatorLevel` = %d, `Level` = %d, `Faction` = %d, `FactionRank` = %d, `BankMoney` = %d, `Kicked` = %d, `Banned` = %d, `AjailTime` = %d, `Ajailed` = %d, `HouseKey` = %d, `Job` = %d, `TutorialComplete` = %d, `Health` = %f, `Armour` = %f, `Age` = %d, `PhoneNumber` = %d, `CellPhone` = %d WHERE `user` = '%s'",
Where do I go from here? :3
Re: Error help: -
[HiC]TheKiller - 18.01.2012
You will need to use multiple formats because the line is to long. This can be done by doing something like this:
pawn Код:
format(Query, sizeof(Query), "UPDATE `playerinfo` SET `kills` = %d, `deaths` = %d, `money` = %d, `AdminLevel` = %d, `Skin` = %d, `Last Pos X` = %f, `Last Pos Y` = %f, `Last Pos Z` = %f," /*The params here*/
format(Query, sizeof(Query), "%s `Interior` = %d, `DonatorLevel` = %d, `Level` = %d, `Faction` = %d, `FactionRank` = %d, `BankMoney` = %d, `Kicked` = %d, `Banned` = %d, `AjailTime` = %d, `Ajailed` = %d,", Query, /*The params here*/
format(Query, sizeof(Query), "%s `HouseKey` = %d, `Job` = %d, `TutorialComplete` = %d, `Health` = %f, `Armour` = %f, `Age` = %d, `PhoneNumber` = %d, `CellPhone` = %d WHERE `user` = '%s'", Query, /*The params here*/);
Re: Error help: -
iGetty - 18.01.2012
pawn Код:
format(Query, sizeof(Query), "UPDATE `playerinfo` SET `kills` = %d, `deaths` = %d, `money` = %d, `AdminLevel` = %d, `Skin` = %d, `Last Pos X` = %f, `Last Pos Y` = %f, `Last Pos Z` = %f,");
format(Query, sizeof(Query), "%s `Interior` = %d, `DonatorLevel` = %d, `Level` = %d, `Faction` = %d, `FactionRank` = %d, `BankMoney` = %d, `Kicked` = %d, `Banned` = %d, `AjailTime` = %d, `Ajailed` = %d,");
format(Query, sizeof(Query), "%s `HouseKey` = %d, `Job` = %d, `TutorialComplete` = %d, `Health` = %f, `Armour` = %f, `Age` = %d, `PhoneNumber` = %d, `CellPhone` = %d WHERE `user` = '%s'", //datahere
Is that correct?
Re: Error help: -
Scenario - 18.01.2012
Except for the fact that your missing the parameters for all of the specifiers (%s, %d, %f) in each line, yes.