cache_get_value_name(0, "password", PlayerInfo[playerid][password], sizeof(PlayerInfo[playerid][password]) );
cache_get_value_name_int(0, "id", PlayerInfo[playerid][account_id]);
cache_get_value_name_int(0, "id", PlayerInfo[playerid][account_id]);
cache_get_value_name(0, "password", PlayerInfo[playerid][password], sizeof(PlayerInfo[playerid][password]) );
enum EnumPlayerInfo
{
account_id,
bool:prompted,
bool:registered,
bool:authenticated,
password[50],
email[64],
registered_at[40],
last_login[40],
last_login_ip[30],
last_login_country[50]
}
new PlayerInfo[MAX_PLAYERS][EnumPlayerInfo];
bare.pwn(186) : error 001: expected token: "]", but found "-identifier-" bare.pwn(186) : warning 215: expression has no effect bare.pwn(186) : error 001: expected token: ";", but found "]" bare.pwn(186) : error 029: invalid expression, assumed zero bare.pwn(186) : fatal error 107: too many error messages on one line
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
}
new PlayerInfo[MAX_PLAYERS][289];
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:
PHP Code:
|
You have to provide the size (max_len) by yourself if you use an enum-array as destination. |