
C:\Documents and Settings\magnifique2012\Bureau\zm.pwn(365) : error 017: undefined symbol "i" C:\Documents and Settings\magnifique2012\Bureau\zm.pwn(365) : warning 215: expression has no effect C:\Documents and Settings\magnifique2012\Bureau\zm.pwn(365) : error 017: undefined symbol "i" C:\Documents and Settings\magnifique2012\Bureau\zm.pwn(365) : warning 215: expression has no effect C:\Documents and Settings\magnifique2012\Bureau\zm.pwn(365) : error 017: undefined symbol "i" C:\Documents and Settings\magnifique2012\Bureau\zm.pwn(365) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
function StartMap()
{
new str[128];
foreach(Player,i)
{
SetCameraBehindPlayer(i);
ClearAnimations(i);
HumanSetup(i);
SpawnPlayer(i);
SetPlayerDrunkLevel(i,0);
DisablePlayerCheckpoint(i);
TextDrawHideForPlayer(i, ServerIntroOne[i]);
TextDrawHideForPlayer(i, ServerIntroTwo[i]);
DestroyPickup(meatDrops[i]);
DestroyPickup(ammoDrops[i]);
TogglePlayerControllable(i,1);
}
function StartMap()
{
new str[128];
for(new i=0;i <MAX_PLAYERS;i++)
{
SetCameraBehindPlayer(i);
ClearAnimations(i);
HumanSetup(i);
SpawnPlayer(i);
SetPlayerDrunkLevel(i,0);
DisablePlayerCheckpoint(i);
TextDrawHideForPlayer(i, ServerIntroOne[i]);
TextDrawHideForPlayer(i, ServerIntroTwo[i]);
DestroyPickup(meatDrops[i]);
DestroyPickup(ammoDrops[i]);
TogglePlayerControllable(i,1);
}
}
foreach (i : Player)
// or even better
foreach (new i : Player)
|
Well you have to declare the variable i if you want to use it.
Also, I think you should use foreach like this: pawn Код:
|
C:\Documents and Settings\magnifique2012\Bureau\zm.pwn(365) : error 017: undefined symbol "i"
function StartMap()
{
new str[128];
foreach(new i : Player)
{
SetCameraBehindPlayer(i);
ClearAnimations(i);
HumanSetup(i);
SpawnPlayer(i);
SetPlayerDrunkLevel(i,0);
DisablePlayerCheckpoint(i);
TextDrawHideForPlayer(i, ServerIntroOne[i]);
TextDrawHideForPlayer(i, ServerIntroTwo[i]);
DestroyPickup(meatDrops[i]);
DestroyPickup(ammoDrops[i]);
TogglePlayerControllable(i,1);
}
}
#include <foreach>