PDA

View Full Version : Error help:


iGetty
18/01/2012, 06:01 AM
(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


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

[HiC]TheKiller
18/01/2012, 06:09 AM
You will need to use multiple formats because the line is to long. This can be done by doing something like this:


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*/);

iGetty
18/01/2012, 06:18 AM
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?

Scenario
18/01/2012, 12:33 PM
Except for the fact that your missing the parameters for all of the specifiers (%s, %d, %f) in each line, yes.