Input line too long at mysql_format , rep ++ thanks! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Input line too long at mysql_format , rep ++ thanks! (
/showthread.php?tid=550844)
Input line too long at mysql_format , rep ++ thanks! -
buburuzu19 - 15.12.2014
I get this errors:
pawn Код:
C:x(16203) : error 075: input line too long (after substitutions)
C:x(16204) : error 037: invalid string (possibly non-terminated string)
C:x(16204) : error 017: undefined symbol "UPDATE"
C:x(16204) : error 017: undefined symbol "businesses"
C:x(16204) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
My code:
pawn Код:
stock saveBusiness(const id) {
if(strlen(businessVariables[id][bOwner]) >= 1) {
new
queryString[1424];
mysql_format(handle, queryString, sizeof(queryString), "UPDATE businesses SET businessExteriorX = '%f', businessExteriorY = '%f', businessExteriorZ = '%f', businessInteriorX = '%f', businessInteriorY = '%f', businessInteriorZ = '%f', businessInterior = '%d', businessType = '%d', businessName = '%e', businessOwner = '%e', businessPrice = '%d', businessVault = '%d', businessLock = '%d', businessMiscX = '%f', businessMiscY = '%f',businessMiscZ = '%f',businessEnterPrice = '%d', businessLevel = '%d' WHERE businessID = '%d'",
businessVariables[id][bExteriorPos][0],
businessVariables[id][bExteriorPos][1], businessVariables[id][bExteriorPos][2], businessVariables[id][bInteriorPos][0], businessVariables[id][bInteriorPos][1], businessVariables[id][bInteriorPos][2], businessVariables[id][bInterior], businessVariables[id][bType], businessVariables[id][bName], businessVariables[id][bOwner], businessVariables[id][bPrice], businessVariables[id][bVault], businessVariables[id][bLocked], businessVariables[id][bMiscPos][0],
businessVariables[id][bMiscPos][1], businessVariables[id][bMiscPos][2],businessVariables[id][bEnterPrice],businessVariables[id][bLevel] id);
mysql_tquery(handle, queryString);
}
else {
return false;
}
return 1;
}
What to do for fixing ?
Re: Input line too long at mysql_format , rep ++ thanks! -
rickisme - 15.12.2014
pawn Код:
stock saveBusiness(const id) {
if(strlen(businessVariables[id][bOwner]) >= 1) {
new
queryString[1424];
mysql_format(handle, queryString, sizeof(queryString), "UPDATE businesses SET \
businessExteriorX = '%f', \
businessExteriorY = '%f', \
businessExteriorZ = '%f', \
businessInteriorX = '%f', \
businessInteriorY = '%f', \
businessInteriorZ = '%f', \
businessInterior = '%d', \
businessType = '%d', \
businessName = '%e', \
businessOwner = '%e', \
businessPrice = '%d', \
businessVault = '%d', \
businessLock = '%d', \
businessMiscX = '%f', \
businessMiscY = '%f', \
businessMiscZ = '%f', \
businessEnterPrice = '%d', \
businessLevel = '%d' \
WHERE businessID = '%d'",
businessVariables[id][bExteriorPos][0],
businessVariables[id][bExteriorPos][1],
businessVariables[id][bExteriorPos][2],
businessVariables[id][bInteriorPos][0],
businessVariables[id][bInteriorPos][1],
businessVariables[id][bInteriorPos][2],
businessVariables[id][bInterior],
businessVariables[id][bType],
businessVariables[id][bName],
businessVariables[id][bOwner],
businessVariables[id][bPrice],
businessVariables[id][bVault],
businessVariables[id][bLocked],
businessVariables[id][bMiscPos][0],
businessVariables[id][bMiscPos][1],
businessVariables[id][bMiscPos][2],
businessVariables[id][bEnterPrice],
businessVariables[id][bLevel],
id
);
mysql_tquery(handle, queryString);
}
else {
return false;
}
return 1;
}
Re: Input line too long at mysql_format , rep ++ thanks! -
buburuzu19 - 15.12.2014
i done it myself creating another mysql_format and antoher mysql_tquery.. but thanks