error 075: input line too long (after substitutions)
#8

Quote:
Originally Posted by [GF]Sasino97
Посмотреть сообщение
You made a little mistake, you formatted 3 times the third string, with the lenght of the others, the right code is

pawn Код:
new str[5][150], lstr[512];
format(str[0], sizeof(str[0]), "UPDATE `sa-mp`.`propertyinfo` SET `E_X`='%f', `E_Y`='%f', `E_Z`='%f', `E_INT`='%d'", propertyInfo[propertyid][E_X],propertyInfo[propertyid][E_Y],propertyInfo[propertyid][E_Z],propertyInfo[propertyid][E_INT]);
format(str[1], sizeof(str[1]), "`E_VW`='%d', `I_X`='%f', `I_Y`='%f', `I_Z`='%f',", propertyInfo[propertyid][E_VW], propertyInfo[propertyid][I_X],propertyInfo[propertyid][I_Y],propertyInfo[propertyid][I_Z]);
format(str[2], sizeof(str[2]), "`I_INT`='%d', `CASHBOX`='%d', `TYPE`='%d', `LEVEL`='%d',", propertyInfo[propertyid][I_INT],propertyInfo[propertyid][CASHBOX],propertyInfo[propertyid][TYPE],propertyInfo[propertyid][LEVEL]);
format(str[3], sizeof(str[3]), "`NAME`='%s', `OWNER`='%s',`CO_OWNER`='%s', `SOLD`='%d',", propertyInfo[propertyid][NAME],propertyInfo[propertyid][OWNER],propertyInfo[propertyid][CO_OWNER],propertyInfo[propertyid][SOLD],);
format(str[4], sizeof(str[4]), "`LOCK`='%d', `ALARM`='%d', `PRICE`='%d' WHERE `ID`='%d'", propertyInfo[propertyid][LOCK],propertyInfo[propertyid][ALARM],propertyInfo[propertyid][PRICE], propertyid);
format(lstr, sizeof(lstr), "%s %s %s %s", str[0], str[1], str[2], str[3], str[4]);
mysql_query(lstr);
Duhh this gives me 4 errors of:

pawn Код:
(540) : error 001: expected token: "]", but found "-integer value-"
(540) : warning 215: expression has no effect
(540) : error 001: expected token: ";", but found "]"
(540) : error 029: invalid expression, assumed zero
(540) : fatal error 107: too many error messages on one line
Line 540
pawn Код:
format(str[0], sizeof(str[0]), "UPDATE `sa-mp`.`propertyinfo` SET `E_X`='%f', `E_Y`='%f', `E_Z`='%f', `E_INT`='%d'", propertyInfo[propertyid][E_X],propertyInfo[propertyid][E_Y],propertyInfo[propertyid][E_Z],propertyInfo[propertyid][E_INT]);
and it seems fine
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)