01.01.2018, 08:39
Hm, well I know there are multiple of these in the lines, but I don't know how exactly I can change up that variable to not be in there twice.
Adding the line numbers in on this.
This is what the code is shadowing
The main line here is MAX_PLAYER_NAME which I don't see anyway of changing that without causing anymore problems. I know for some variables you can change them slightly to insure no shadowing. But I'm not sure about this... I've tried changing the variable, and made sure to define the variables ( I think anyways) But still get the same error. I feel like I'm missing something....
Код:
public OnFilterScriptInit() { new 143 name[MAX_PLAYER_NAME]; 144 145 SSCANF_Init(GetMaxPlayers(), INVALID_PLAYER_ID, MAX_PLAYER_NAME); 146 SSCANF_gInit = true; 147 148 // Check if there are any players that aren't initialized. 149 for (new i = 0; i < MAX_PLAYERS; i ++) 150 { 151 if (IsPlayerConnected(i) && !SSCANF_IsConnected(i)) 152 { 153 GetPlayerName(i, name, MAX_PLAYER_NAME); 154 SSCANF_Join(i, name, IsPlayerNPC(i)); 155 } 156 }
This is what the code is shadowing
Код:
public OnGameModeInit() { if (!SSCANF_gInit) { new 187 name[MAX_PLAYER_NAME]; 188 189 SSCANF_Init(GetMaxPlayers(), INVALID_PLAYER_ID, MAX_PLAYER_NAME); 190 SSCANF_gInit = true; 191 192 // Check if there are any players that aren't initialized. 193 for (new i = 0; i < MAX_PLAYERS; i ++) 194 { 195 if (IsPlayerConnected(i) && !SSCANF_IsConnected(i)) 196 { 197 GetPlayerName(i, name, MAX_PLAYER_NAME); 198 SSCANF_Join(i, name, IsPlayerNPC(i)); 199 } }