01.11.2011, 00:21
Vocкs poderia me dizer como eu crio um FOR que vai setar todas as variбveis de uma enum para 0?
enum PlayerData { PAssassinatos,PMortes,PSuicidios,PDinheiro,PBanco,PLevel, PLogado,PMudo,PPreso,Pinderby,PGangCargo,PGang } new arrayPlayer[MAX_PLAYERS][PlayerData];
for(new i = 0; i <= MAX_PLAYERS; i++)
{
PlayerInfo[i][pAdmin] = 0;// exemplo
}
for(new a = 0; a <= PlayerData; a++)
{
arrayPlayer[playerid][a] = 0;
}
D:\Brбulio's Corporation ©\SA-MP Server\gamemodes\lvdm.pwn(5587) : warning 213: tag mismatch D:\Brбulio's Corporation ©\SA-MP Server\gamemodes\lvdm.pwn(5589) : warning 213: tag mismatch Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Warnings.
arrayPlayer[playerid][PAssassinatos] = 0;
arrayPlayer[playerid][PMortes] = 0;
...
for(new x = 0; x != _:PlayerData; x++)
{
arrayPlayer[playerid][PlayerData:x] = 0;
}
D:\Brбulio's Corporation ©\SA-MP Server\gamemodes\lvdm.pwn(5591) : warning 219: local variable "x" shadows a variable at a preceding level D:\Brбulio's Corporation ©\SA-MP Server\gamemodes\lvdm.pwn(5591) : warning 213: tag mismatch D:\Brбulio's Corporation ©\SA-MP Server\gamemodes\lvdm.pwn(5591) : warning 206: redundant test: constant expression is non-zero D:\Brбulio's Corporation ©\SA-MP Server\gamemodes\lvdm.pwn(5591) : error 022: must be lvalue (non-constant) D:\Brбulio's Corporation ©\SA-MP Server\gamemodes\lvdm.pwn(5593) : error 032: array index out of bounds (variable "arrayPlayer") D:\Brбulio's Corporation ©\SA-MP Server\gamemodes\lvdm.pwn(5591) : warning 204: symbol is assigned a value that is never used: "x" D:\Brбulio's Corporation ©\SA-MP Server\gamemodes\lvdm.pwn(5591 -- 5595) : warning 225: unreachable code Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.