error 001: expected token: ",", but found "[" -
Electrifying - 20.11.2018
Novamente venho aqui para pedir ajuda com arrays, agora ajeitei grande parte dos problemas mas estou recebendo esse erro:
Код:
error 010: invalid function or declaration
error 001: expected token: ",", but found "["
error 029: invalid expression, assumed zero
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
fatal error 107: too many error messages on one line
PHP код:
{1188, "Slamin Front Bumper", CARMODTYPE_FRONT_BUMPER, {567}},
{1189, "Chrome Front Bumper", CARMODTYPE_FRONT_BUMPER, {567}},
{1190, "Slamin Front Bumper", CARMODTYPE_FRONT_BUMPER, {576}},
{1191, "Chrome Front Bumper", CARMODTYPE_FRONT_BUMPER, {576}},
{1192, "Chrome Rear Bumper", CARMODTYPE_REAR_BUMPER, {576}},
{1193, "Slamin Rear Bumper", CARMODTYPE_REAR_BUMPER, {576}}
}; //Final da array erro 010
PHP код:
format(strcomponent, sizeof(strcomponent), "%s", AllComponents[0][cName][CARMODTYPE_SPOILER][vehiclemodel]); //error 001 atй 107
Esse erro sу ocorre quando eu adiciono "vehiclemodel" pra verificar o carro que o veнculo estб usando e mostrar os componentes
linha do cуdigo
PHP код:
new vehiclemodel = GetVehicleModel(GetPlayerVehicleID(playerid));
Agradeзo а quem ajudar.
Re: error 001: expected token: ",", but found "[" -
ipsLuan - 20.11.2018
PHP код:
{1188, "Slamin Front Bumper", CARMODTYPE_FRONT_BUMPER, {567}},
{1189, "Chrome Front Bumper", CARMODTYPE_FRONT_BUMPER, {567}},
{1190, "Slamin Front Bumper", CARMODTYPE_FRONT_BUMPER, {576}},
{1191, "Chrome Front Bumper", CARMODTYPE_FRONT_BUMPER, {576}},
{1192, "Chrome Rear Bumper", CARMODTYPE_REAR_BUMPER, {576}},
{1193, "Slamin Rear Bumper", CARMODTYPE_REAR_BUMPER, {576}}
};
Re: error 001: expected token: ",", but found "[" -
Electrifying - 20.11.2018
Quote:
Originally Posted by ipsLuan
PHP код:
{1188, "Slamin Front Bumper", CARMODTYPE_FRONT_BUMPER, {567}},
{1189, "Chrome Front Bumper", CARMODTYPE_FRONT_BUMPER, {567}},
{1190, "Slamin Front Bumper", CARMODTYPE_FRONT_BUMPER, {576}},
{1191, "Chrome Front Bumper", CARMODTYPE_FRONT_BUMPER, {576}},
{1192, "Chrome Rear Bumper", CARMODTYPE_REAR_BUMPER, {576}},
{1193, "Slamin Rear Bumper", CARMODTYPE_REAR_BUMPER, {576}}
};
|
O erro ainda persiste.
Re: error 001: expected token: ",", but found "[" -
Electrifying - 20.11.2018
Alguйm?
Re: error 001: expected token: ",", but found "[" -
Ermanhaut - 20.11.2018
O problema й aquela vнrgula da ultima linha.
Re: error 001: expected token: ",", but found "[" -
Electrifying - 20.11.2018
Quote:
Originally Posted by Ermanhaut
O problema й aquela vнrgula da ultima linha.
|
Eu jб removi porйm continua a mesma coisa.
Re: error 001: expected token: ",", but found "[" -
Electrifying - 20.11.2018
Aqui todo o cуdigo caso precise verificar
https://pastebin.com/nDAtrxjv
Re: error 001: expected token: ",", but found "[" -
Electrifying - 20.11.2018
Alguйm?
Re: error 001: expected token: ",", but found "[" -
MultiKill - 20.11.2018
Falta abrir uma chave nessa parte:
PHP код:
{1031, "Right X-Flow Sideskirt", CARMODTYPE_SIDESKIRT, 560}},
Retire os trкs pontos nas partes que tem
PHP код:
{1073, "Shadow Wheels", CARMODTYPE_WHEELS, {400, ...}},
Para:
PHP код:
{1073, "Shadow Wheels", CARMODTYPE_WHEELS, {400}},
Re: error 001: expected token: ",", but found "[" -
Electrifying - 20.11.2018
Quote:
Originally Posted by MultiKill
Falta abrir uma chave nessa parte:
PHP код:
{1031, "Right X-Flow Sideskirt", CARMODTYPE_SIDESKIRT, 560}},
Retire os trкs pontos nas partes que tem
PHP код:
{1073, "Shadow Wheels", CARMODTYPE_WHEELS, {400, ...}},
Para:
PHP код:
{1073, "Shadow Wheels", CARMODTYPE_WHEELS, {400}},
|
Arrumei a chave faltando. Esse "400, ..." Й uma tentativa minha de tentar percorrer o valor 400 atй 603, a propуsito, jб tentei retirar isso e colocar um valor normal, nгo resolveu. Nada resolvido atй agora.