[MYSQL R40] cache_get_value_name expected token: ";", but found "]"
#2

An enumerated array only has one size. It's kind of difficult to explain but in an enum the value of the next specifier is the value of the previous specifier plus one. In the case of an array it adds the size of the array. So your enum is this:
PHP Code:
enum EnumPlayerInfo
{
    
account_id// 0
    
bool:prompted// 1
    
bool:registered// 2
    
bool:authenticated// 3
    
password[50], // 4
    
email[64], // 54
    
registered_at[40], // 118
    
last_login[40], // 158
    
last_login_ip[30], // 188
    
last_login_country[50// 238

and what actually get compiled is simply this:
PHP Code:
new PlayerInfo[MAX_PLAYERS][289]; 
I may have been slightly off with my calculations but the statement stands.
Reply


Messages In This Thread
[MYSQL R40] cache_get_value_name expected token: ";", but found "]" - by iSanchez - 14.04.2017, 05:23
Re: [MYSQL R40] cache_get_value_name expected token: ";", but found "]" - by Vince - 14.04.2017, 05:41
Re: [MYSQL R40] cache_get_value_name expected token: ";", but found "]" - by raydx - 14.04.2017, 08:14
Respuesta: Re: [MYSQL R40] cache_get_value_name expected token: ";", but found "]" - by iSanchez - 14.04.2017, 19:08

Forum Jump:


Users browsing this thread: 1 Guest(s)