Error help:
#1

Код:
(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
Reply
#2

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

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?
Reply
#4

Except for the fact that your missing the parameters for all of the specifiers (%s, %d, %f) in each line, yes.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)