C:\Users\Callum.Acer\Desktop\NCRP Working\gamemodes\LALSR.pwn(223) : error 017: undefined symbol "string" C:\Users\Callum.Acer\Desktop\NCRP Working\gamemodes\LALSR.pwn(223) : error 017: undefined symbol "string" C:\Users\Callum.Acer\Desktop\NCRP Working\gamemodes\LALSR.pwn(223) : error 029: invalid expression, assumed zero C:\Users\Callum.Acer\Desktop\NCRP Working\gamemodes\LALSR.pwn(223) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |
for(new x;x<sizeof(LSPDVehicles);x++) { format(string, sizeof(string), "XMT %d", LSPDVehicles[x]);LINE 223 SetVehicleNumberPlate(LSPDVehicles[x], string); SetVehicleToRespawn(LSPDVehicles[x]); Vehicle_Armor(LSPDVehicles[x]); }
for(new x;x<sizeof(LSPDVehicles);x++) { new string[128]; format(string, sizeof(string), "XMT %d", LSPDVehicles[x]);LINE 223 SetVehicleNumberPlate(LSPDVehicles[x], string); SetVehicleToRespawn(LSPDVehicles[x]); Vehicle_Armor(LSPDVehicles[x]); }
C:\Users\Callum.Acer\Desktop\NCRP Working\gamemodes\LALSR.pwn(221) : error 017: undefined symbol "NEW" C:\Users\Callum.Acer\Desktop\NCRP Working\gamemodes\LALSR.pwn(221) : error 017: undefined symbol "x" C:\Users\Callum.Acer\Desktop\NCRP Working\gamemodes\LALSR.pwn(221) : warning 215: expression has no effect C:\Users\Callum.Acer\Desktop\NCRP Working\gamemodes\LALSR.pwn(221) : error 001: expected token: ")", but found ";" C:\Users\Callum.Acer\Desktop\NCRP Working\gamemodes\LALSR.pwn(221) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |
for(NEW x;x<sizeof(LSPDVehicles);x++)[SIZE=6]LINE=221 { new string[128]; format(string, sizeof(string), "XMT %d", LSPDVehicles[x]); SetVehicleNumberPlate(LSPDVehicles[x], string); SetVehicleToRespawn(LSPDVehicles[x]); Vehicle_Armor(LSPDVehicles[x]); }
Code:
for(NEW x;x<sizeof(LSPDVehicles);x++)[SIZE=6]LINE=221 { new string[128]; format(string, sizeof(string), "XMT %d", LSPDVehicles[x]); SetVehicleNumberPlate(LSPDVehicles[x], string); SetVehicleToRespawn(LSPDVehicles[x]); Vehicle_Armor(LSPDVehicles[x]); } |
for(new x;x<sizeof(LSPDVehicles);x++)[SIZE=6] { new string[128]; format(string, sizeof(string), "XMT %d", LSPDVehicles[x]); SetVehicleNumberPlate(LSPDVehicles[x], string); SetVehicleToRespawn(LSPDVehicles[x]); Vehicle_Armor(LSPDVehicles[x]); } return 1; }
Code:
for(new x;x<sizeof(LSPDVehicles);x++)[SIZE=6] { new string[128]; format(string, sizeof(string), "XMT %d", LSPDVehicles[x]); SetVehicleNumberPlate(LSPDVehicles[x], string); SetVehicleToRespawn(LSPDVehicles[x]); Vehicle_Armor(LSPDVehicles[x]); } return 1; } |
2 important notices:
1. The string just is 4 characters + 1 integer. Why would you make it 128 bytes long? Even if the integer was at INTEGER_MAX, the string will never be longer than 14 chars. 2. Always put variable definitions before the loop, not inside of it. Why would you create and destroy the same variable 1000 times, if its enough if you just define it once. |