SA-MP Forums Archive
error 001: expected token: "}", but found "[" - 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: error 001: expected token: "}", but found "[" (/showthread.php?tid=639010)



error 001: expected token: "}", but found "[" - MRM - 10.08.2017

Guys help me please,I got this error:
(91) : error 001: expected token: "}", but found "["
PHP код:
enum clan_info
{
    
name[16],
    
menu,
    
Ckasf[8][19],//line 91
    
helping
};
new 
Clans[MAX_CLANS][clan_info]; 



Re: error 001: expected token: "}", but found "[" - Ghazal - 10.08.2017

https://sampforum.blast.hk/showthread.php?tid=373107


Re: error 001: expected token: "}", but found "[" - Jumberi - 10.08.2017

just remove the ";" from }


Re: error 001: expected token: "}", but found "[" - Michael@Belgium - 10.08.2017

You cant have a 2 dimensional array in an enum, place it outside of it.

Which becomes a 3d array
Код:
Ckasf[MAX_CLANS][8][19]



Re: error 001: expected token: "}", but found "[" - MRM - 11.08.2017

Quote:
Originally Posted by Ghazal
Посмотреть сообщение
Not working.I think it isn't for a string.

Quote:
Originally Posted by Jumberi
Посмотреть сообщение
just remove the ";" from }
Not work.


Re: error 001: expected token: "}", but found "[" - Dayrion - 11.08.2017

You can't get 4D array dimension without Zeex's compiler. Remove, at least, one dimension.
PHP код:
enum clan_info 

    
name[16], 
    
menu
    
Ckasf[8], // [19],//line 91 
    
helping 
}; 
new 
Clans[MAX_CLANS][clan_info]; 



Re: error 001: expected token: "}", but found "[" - Qbao - 11.08.2017

Quote:
Originally Posted by MRM
Посмотреть сообщение
Guys help me please,I got this error:
(91) : error 001: expected token: "}", but found "["
PHP код:
enum clan_info
{
    
name[16],
    
menu,
    
Ckasf[8][19],//line 91
    
helping
};
new 
Clans[MAX_CLANS][clan_info]; 
You try this one
Код:
enum clan_info 
{ 
    name[16], 
    menu, 
    Ckasf[8][19],//line 91 
    helping 
}
new Clans[MAX_CLANS][clan_info];



Re: error 001: expected token: "}", but found "[" - VVWVV - 11.08.2017

Quote:
Originally Posted by Qbao
Посмотреть сообщение
You try this one
Код:
enum clan_info 
{ 
    name[16], 
    menu, 
    Ckasf[8][19],//line 91 
    helping 
}
new Clans[MAX_CLANS][clan_info];
This code has the same error.

Solution:
Quote:
Originally Posted by Michael@Belgium
Посмотреть сообщение
You cant have a 2 dimensional array in an enum, place it outside of it.

Which becomes a 3d array
Код:
Ckasf[MAX_CLANS][8][19]



Re: error 001: expected token: "}", but found "[" - GoldenLion - 11.08.2017

Quote:
Originally Posted by MRM
Посмотреть сообщение
Not working.I think it isn't for a string.
There are actually no strings in pawn, they are arrays.