stock SaveFactions(factionid)
{
new query[1000];
format(query, sizeof(query), "UPDATE `Factions` SET `FactionName` = '%s', `CommandTypes` = %d, `RankName1` = '%s', `RankName2` = '%s', `RankName3` = '%s', `RankName4` = '%s', `RankName5` = '%s', `RankName6` = '%s',`RankName7` = '%s', `Skin1` = %d, `Skin2` = %d, `Skin2` = %d, `Skin3` = %d, `Skin4` = %d, `Skin5` = %d, `Skin6` = %d, `Skin7` = %d, `HQInteriorID` = %d, `HQInteriorX` = '%f', `HQInteriorY` = '%f', `HQInteriorZ` = '%f', `HQInteriorA` = '%f', `HQExteriorID` = %d, `HQExteriorX` = '%f', `HQExteriorY` = '%f', `HQExteriorZ` = '%f', `HQExteriorA` = '%f', `SafeInteriorID` = %d, `SafeX`= '%f', `SafeY` = '%f', `SafeZ` = '%f', `SafeWorld` = %d, `HQLock` = %d, `FOwner` = '%s', WHERE `FactionID` = %d",
Faction[factionid][FactionName],
Faction[factionid][RankName1],
Faction[factionid][RankName2],
Faction[factionid][RankName3],
Faction[factionid][RankName4],
Faction[factionid][RankName5],
Faction[factionid][RankName6],
Faction[factionid][RankName7],
Faction[factionid][Skin1],
Faction[factionid][Skin2],
Faction[factionid][Skin3],
Faction[factionid][Skin4],
Faction[factionid][Skin5],
Faction[factionid][Skin6],
Faction[factionid][Skin7],
Faction[factionid][HQInteriorID],
Faction[factionid][HQInteriorX],
Faction[factionid][HQInteriorY],
Faction[factionid][HQInteriorZ],
Faction[factionid][HQInteriorA],
Faction[factionid][HQExteriorID],
Faction[factionid][HQExteriorX],
Faction[factionid][HQExteriorY],
Faction[factionid][HQExteriorZ],
Faction[factionid][HQExteriorA],
Faction[factionid][SafeInteriorID],
Faction[factionid][SafeX],
Faction[factionid][SafeY],
Faction[factionid][SafeZ],
Faction[factionid][SafeWorld],
Faction[factionid][HQLock],
Faction[factionid][FOwner],
factionid,
mysql_function_query(connectionHandle, query, false, "DefaultCallback", "");
return 1;
}
C:\Users\User\Desktop\GTA RP Script\gamemodes\RolePlay.pwn(2050) : error 075: input line too long (after substitutions) C:\Users\User\Desktop\GTA RP Script\gamemodes\RolePlay.pwn(2051) : error 037: invalid string (possibly non-terminated string) C:\Users\User\Desktop\GTA RP Script\gamemodes\RolePlay.pwn(2051) : error 017: undefined symbol "UPDATE" C:\Users\User\Desktop\GTA RP Script\gamemodes\RolePlay.pwn(2051) : error 029: invalid expression, assumed zero C:\Users\User\Desktop\GTA RP Script\gamemodes\RolePlay.pwn(2051) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
format(query, sizeof(query), "UPDATE `Factions` SET `FactionName` = '%s', `CommandTypes` = %d, `RankName1` = '%s', `RankName2` = '%s', \
`RankName3` = '%s', `RankName4` = '%s', `RankName5` = '%s', `RankName6` = '%s',`RankName7` = '%s', \
`Skin1` = %d, `Skin2` = %d, `Skin2` = %d, `Skin3` = %d, `Skin4` = %d, `Skin5` = %d, `Skin6` = %d, `Skin7` = %d, `HQInteriorID` = %d, \
`HQInteriorX` = '%f', `HQInteriorY` = '%f', `HQInteriorZ` = '%f', `HQExteriorID` = %d, `HQExteriorX` = '%f', `HQExteriorY` = '%f', \
`HQExteriorZ` = '%f', `SafeInteriorID` = %d, `SafeX`= '%f', `SafeY` = '%f', `SafeZ` = '%f', `SafeWorld` = %d, \
`HQLock` = %d, `FOwner` = '%s'(comma here wasn't needed :)) WHERE `FactionID` = %d",
Hi, the problem is your query line is too large (not size wise) but as in it's width across the PAWNO editor.
You're going to have to spilt it up using the '/' character. pawn Код:
![]() Goodluck, that should provide you with a fix. |
I'm going to say this again and again until someone listens: if you need to add numbers to field names then you're doing it wrong. Use more tables.
|
stock SaveFaction(factionid)
{
new query[5000];
format(query, sizeof(query), "UPDATE `Factions` SET `FactionName` = '%s', `CommandTypes` = %d, `RankName1` = '%s', `RankName2` = '%s', \
`RankName3` = '%s', `RankName4` = '%s', `RankName5` = '%s', `RankName6` = '%s',\
`RankName7` = '%s', `Skin1` = %d, `Skin2` = %d, `Skin2` = %d, `Skin3` = %d, `Skin4` = %d, \
`Skin5` = %d, `Skin6` = %d, `Skin7` = %d, \
`HQInteriorID` = %d, `HQInteriorX` = '%f', `HQInteriorY` = '%f', `HQInteriorZ` = '%f', \
`HQInteriorA` = '%f', `HQExteriorID` = %d, `HQExteriorX` = '%f', `HQExteriorY` = '%f', \
`HQExteriorZ` = '%f', `HQExteriorA` = '%f', `SafeInteriorID` = %d, `SafeX`= '%f', `SafeY` = '%f', \
`SafeZ` = '%f', `SafeWorld` = %d,`HQLock` = %d, `FOwner` = '%s' WHERE `FactionID` = %d",
Factions[factionid][FactionName],
Factions[factionid][RankName1],
Factions[factionid][RankName2],
Factions[factionid][RankName3],
Factions[factionid][RankName4],
Factions[factionid][RankName5],
Factions[factionid][RankName6],
Factions[factionid][RankName7],
Factions[factionid][Skin1],
Factions[factionid][Skin2],
Factions[factionid][Skin3],
Factions[factionid][Skin4],
Factions[factionid][Skin5],
Factions[factionid][Skin6],
Factions[factionid][Skin7],
Factions[factionid][HQInteriorID],
Factions[factionid][HQInteriorX],
Factions[factionid][HQInteriorY],
Factions[factionid][HQInteriorZ],
Factions[factionid][HQInteriorA],
Factions[factionid][HQExteriorID],
Factions[factionid][HQExteriorX],
Factions[factionid][HQExteriorY],
Factions[factionid][HQExteriorZ],
Factions[factionid][HQExteriorA],
Factions[factionid][SafeInteriorID],
Factions[factionid][SafeX],
Factions[factionid][SafeY],
Factions[factionid][SafeZ],
Factions[factionid][SafeWorld],
Factions[factionid][HQLock],
Factions[factionid][FOwner],
factionid,
mysql_function_query(connectionHandle, query, false, "DefaultCallback", "");
return 1;
}
C:\Users\User\Desktop\GTA RP Script\gamemodes\RolePlay.pwn(2050) : error 075: input line too long (after substitutions) C:\Users\User\Desktop\GTA RP Script\gamemodes\RolePlay.pwn(2051) : error 037: invalid string (possibly non-terminated string) C:\Users\User\Desktop\GTA RP Script\gamemodes\RolePlay.pwn(2051) : error 017: undefined symbol "UPDATE" C:\Users\User\Desktop\GTA RP Script\gamemodes\RolePlay.pwn(2051) : error 029: invalid expression, assumed zero C:\Users\User\Desktop\GTA RP Script\gamemodes\RolePlay.pwn(2051) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
factionid | rankid | rankname |
1 | 1 | Beginner |
1 | 2 | Advanced |
1 | 3 | Senior |
1 | 4 | Master |
factionid | skinid |
1 | 211 |
1 | 212 |
1 | 225 |
1 | 233 |
The way I see it you should use at least three tables. One for the main information, one for the ranks and one for the skins. This will also allow you to have an arbitrary amount of ranks and skins, rather than a fixed amount.
Table 1 will be the main table and will contain everything you have right now, except for skins and rank. It needs an id field, though. Table 2 will contain the ranks and will look like this:
|
Hi, the problem is your query line is too large (not size wise) but as in it's width across the PAWNO editor.
You're going to have to spilt it up using the '/' character. pawn Код:
![]() Goodluck, that should provide you with a fix. |
stock SaveFaction(factionid)
{
new query[5000];
format(query, sizeof(query), "UPDATE `Factions` SET `FactionName` = '%s', `CommandTypes` = %d, `RankName1` = '%s', `RankName2` = '%s', \
`RankName3` = '%s', `RankName4` = '%s', `RankName5` = '%s', `RankName6` = '%s', ",
Factions[factionid][FactionName],
Factions[factionid][RankName1],
Factions[factionid][RankName2],
Factions[factionid][RankName3],
Factions[factionid][RankName4],
Factions[factionid][RankName5],
Factions[factionid][RankName6]);
format(query, sizeof(query), "%s`RankName7` = '%s', `Skin1` = %d, `Skin2` = %d, `Skin2` = %d, `Skin3` = %d, `Skin4` = %d, \
`Skin5` = %d, `Skin6` = %d, `Skin7` = %d, \
`HQInteriorID` = %d, `HQInteriorX` = '%f', `HQInteriorY` = '%f', `HQInteriorZ` = '%f', \
`HQInteriorA` = '%f', ",
query,
Factions[factionid][RankName7],
Factions[factionid][Skin1],
Factions[factionid][Skin2],
Factions[factionid][Skin3],
Factions[factionid][Skin4],
Factions[factionid][Skin5],
Factions[factionid][Skin6],
Factions[factionid][Skin7],
Factions[factionid][HQInteriorID],
Factions[factionid][HQInteriorX],
Factions[factionid][HQInteriorY],
Factions[factionid][HQInteriorZ],
Factions[factionid][HQInteriorA]);
format(query, sizeof(query), "%s`HQExteriorID` = %d, `HQExteriorX` = '%f', `HQExteriorY` = '%f', \
`HQExteriorZ` = '%f', `HQExteriorA` = '%f', `SafeInteriorID` = %d, `SafeX`= '%f', `SafeY` = '%f', \
`SafeZ` = '%f', `SafeWorld` = %d,`HQLock` = %d, `FOwner` = '%s' WHERE `FactionID` = %d",
query,
Factions[factionid][HQExteriorID],
Factions[factionid][HQExteriorX],
Factions[factionid][HQExteriorY],
Factions[factionid][HQExteriorZ],
Factions[factionid][HQExteriorA],
Factions[factionid][SafeInteriorID],
Factions[factionid][SafeX],
Factions[factionid][SafeY],
Factions[factionid][SafeZ],
Factions[factionid][SafeWorld],
Factions[factionid][HQLock],
Factions[factionid][FOwner],
factionid);
mysql_function_query(connectionHandle, query, false, "DefaultCallback", "");
return 1;
}