[Help] Bad Syntax on "foreach"
I am sorry for wasting your time but I simply cannot find the error. The following code throws "Bad Syntax" at me:
Code:
foreach ( player in level.players ) {
player giveWeapon( "onemanarmy_mp", 0, false );
player setPerk( "specialty_onemanarmy" );
}
What is wrong about that?
Edit: Found out what the error was. Sorry!
foreach(player in level.players)
{
if(player !isdefined)
continue;
if(player == self)
{
player give weapon etc.
player set perk etc.
}
}
was that what was wrong with it?