Quote:
Originally Posted by E1_531G
g_PlayerData is an array, and PlayerInfo is an enum.
You cannot create an array using other array as dimension.
Quote:
|
so if we do not need this here , where we will need it ?
|
you need it here:
Quote:
|
get_user_name(id , g_PlayerData[id][Player_Name] , charsmax(g_PlayerData[][Player_Name]))
|
now you have player's name in this global array, and you can use it anywhere you need it.
|
works , thanks.
Quote:
Originally Posted by Natsheh
Note:
Also declaring global array variables should always be in the first of the script and thier sizes before them
|
like this ?
PHP Code:
#define MAX_PLAYERS 32
enum _:PlayerInfo
{
Player_Name[32] ,
Player_Authid[35]
}
new g_PlayerData[MAX_PLAYERS + 1] [ PlayerInfo ]
or
PHP Code:
#define G_PLAYER_DATA_SIZE 33
enum _:PlayerInfo
{
Player_Name[32] ,
Player_Authid[35]
}
new g_PlayerData[G_PLAYER_DATA_SIZE] [ PlayerInfo ]