forward SwitchNewSound();
public SwitchNewSound()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInAnyVehicle(i))
{
StopAudioStreamForPlayer(i);
PlayAudioStreamForPlayer(i, RandomSongs[random(sizeof(RandomSongs))]);
URLNumber++;
if(URLNumber == sizeof(RandomSongs)) URLNumber = 0;
}
}
return 1;
}
PlayAudioStreamForPlayer(i, RandomSongs[random(sizeof(RandomSongs))]);
C:\Users\cyber\Desktop\gta server cc bukit\gamemodes\GL.pwn(331) : error 017: undefined symbol "i" C:\Users\cyber\Desktop\gta server cc bukit\gamemodes\GL.pwn(4060) : error 017: undefined symbol "i" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors. |
forward SwitchNewSound(); public SwitchNewSound() { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerInAnyVehicle[i]) { StopAudioStreamForPlayer[i]; PlayAudioStreamForPlayer(i, RandomSongs[random(sizeof(RandomSongs))]); URLNumber++; if(URLNumber == sizeof(RandomSongs)) URLNumber = 0; } } return 1; }
Change i in the line under OnPlayerConnect to playerid.
Whichever line that isn't under OnPlayerConnect that is returning this error needs to be looked at next. |
forward SwitchNewSound(); public SwitchNewSound() { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerInAnyVehicle[i]) { StopAudioStreamForPlayer[i]; PlayAudioStreamForPlayer(i, RandomSongs[random(sizeof(RandomSongs))]); URLNumber++; if(URLNumber == sizeof(RandomSongs)) URLNumber = 0; } } return 1; } |
forward SwitchNewSound(); public SwitchNewSound() { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerInAnyVehicle(i)) { StopAudioStreamForPlayer(i); PlayAudioStreamForPlayer(i, RandomSongs[random(sizeof(RandomSongs))]); URLNumber++; if(URLNumber == sizeof(RandomSongs)) URLNumber = 0; } } return 1; }