error 008: must be a constant expression; assumed zero (+REP) [quick one]
#1

the line with the error is new ClanDB[ClanName][ClanInfo];

PHP код:
enum ClanInfo
{
    
Bank,
    
Color
}
new 
ClanName[32];
new 
ClanDB[ClanName][ClanInfo]; 
Reply
#2

As far as I know, you cannot use a string as an array index.

Hence, you will have to assign an ID to every clan name.
PHP код:
#define MAX_CLANS 50
#define CLAN_POLICE 1
#define CLAN_MEDIC 2
enum ClanInfo 

    
Bank
    
Color 

new 
ClanDB[MAX_CLANS][ClanInfo];  
Function(){
ClanDB[CLAN_POLICE][Bank] = 1337;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)