error 001: expected token: "}", but found "["
#1

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]; 
Reply
#2

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

just remove the ";" from }
Reply
#4

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]
Reply
#5

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.
Reply
#6

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]; 
Reply
#7

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];
Reply
#8

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]
Reply
#9

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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)