SA-MP Forums Archive
[Ajuda] error 001: expected token: ",", but found "[" - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] error 001: expected token: ",", but found "[" (/showthread.php?tid=661050)



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(strcomponentsizeof(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_SIDESKIRT560}}, 
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_SIDESKIRT560}}, 
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.