[Solved] ResetPlayerInfo + Loop
#1

In the past I used to reset the player data by this way:
pawn Код:
ResetPlayerData(playerid)
{
  Var[playerid][ID] = 0;
  Var[playerid][Name] = EOS;
}
But it takes too long to add because there are a lot of cells for "Var". Then I thought, what if I use a loop? so I tried this:
pawn Код:
ResetPlayerData(playerid)
{
  for(new i = 0; i < MAX_P_VAR; i ++)
  {
    switch(i)
    {
      case 1..8: Var[playerid][i] = EOS; // this line error
      case 9, 15, 20: Var[playerid][i] = -1; // if I added this it would show another error
    }  
  }
}
But it returns an error.
Код:
mygm.pwn(168) : warning 213: tag mismatch
Is there a way to do what I want?
Reply


Messages In This Thread
[Solved] ResetPlayerInfo + Loop - by Miguel - 25.04.2010, 19:13
Re: ResetPlayerInfo + Loop - by smeti - 25.04.2010, 19:20
Re: ResetPlayerInfo + Loop - by Miguel - 25.04.2010, 19:25
Re: ResetPlayerInfo + Loop - by woot - 25.04.2010, 20:09
Re: ResetPlayerInfo + Loop - by Miguel - 25.04.2010, 20:26
Re: ResetPlayerInfo + Loop - by smeti - 25.04.2010, 20:33
Re: ResetPlayerInfo + Loop - by Miguel - 25.04.2010, 23:36

Forum Jump:


Users browsing this thread: 1 Guest(s)