03.08.2014, 14:36
The loop entry has to come before the switch. Only cases can come after the switch is used. Therefore, it should look like this:
It's worth noting that instead of using the brackets, if you only have one line of code after a 'case', then you can just it like above and save space. If you have more code, then use brackets and put the code inside.
pawn Код:
if(dialogid == DIALOG_PLAYLIST)
{
if(response)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
switch(listitem)
{
case 0: StopAudioStreamForPlayer(i);
case 1: PlayAudioStreamForPlayer(i, "");
case 2: PlayAudioStreamForPlayer(i, "");
case 3: PlayAudioStreamForPlayer(i, "");
case 4: PlayAudioStreamForPlayer(i, "");
case 5: PlayAudioStreamForPlayer(i, "");
case 6: PlayAudioStreamForPlayer(i, "");
case 7: PlayAudioStreamForPlayer(i, "");
case 8: PlayAudioStreamForPlayer(i, "");
}
}
}
else return 0;
}