helpercmd.pwn(173) : error 028: invalid subscript (not an array or too many subscripts): "pHelper"
helpercmd.pwn(173) : warning 215: expression has no effect
helpercmd.pwn(173) : error 001: expected token: ";", but found "]"
helpercmd.pwn(173) : error 029: invalid expression, assumed zero
helpercmd.pwn(173) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
CMD:kickh(playerid, params[])
{
173 --->> if(pHelper[playerid] == 1)
{
new ID, Motivo[40], string[70];
if(sscanf(params, "ds", ID, Motivo)) return SendClientMessage(playerid, 0xFFFFFFAA, "Digite /kick ID Motivo");
format(string, sizeof(string), "Vocк foi kickado [ Motivo %s ]", Motivo);
SendClientMessage(ID, 0xFFFFFFAA, string);
Kick(ID);
}
return 1;
}
enum pInfo
{
pSkin,
pSenha,
pHelper,
pDG,
pMod
};
if(SuaVar[playerid][pHelper] == 1) [...]
enum pInfo
{
pSkin,
pSenha,
pHelper,
pDG,
pMod
};
new Player_Info[MAX_PLAYERS][pInfo];
if(Player_Info[playerid][pHelper] == 1)
{
//
}
recomendo que veja este tutorial de Enum https://sampforum.blast.hk/showthread.php?tid=318307
PHP код:
|
helpercmd.pwn(170) : error 032: array index out of bounds (variable "Player_Info")
helpercmd.pwn(187) : error 028: invalid subscript (not an array or too many subscripts): "pHelper"
helpercmd.pwn(187) : warning 215: expression has no effect
helpercmd.pwn(187) : error 001: expected token: ";", but found "]"
helpercmd.pwn(187) : error 029: invalid expression, assumed zero
helpercmd.pwn(187) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
CMD:kickh(playerid, params[])
{
if(Player_Info[playerid][pHelper] == 1)
{
new ID, Motivo[40], string[70];
if(sscanf(params, "ds", ID, Motivo)) return SendClientMessage(playerid, 0xFFFFFFAA, "Digite /kick ID Motivo");
format(string, sizeof(string), "Vocк foi kickado [ Motivo %s ]", Motivo);
SendClientMessage(ID, 0xFFFFFFAA, string);
Kick(ID);
}
return 1;
}
CMD:sethelper(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new ID;
if(sscanf(params, "d", ID)) return SendClientMessage(playerid, 0xFFFFFFAA, "Digite /sethelper ID");
pHelper[ID] = 1;
}
return 1;
}
CMD:kickh(playerid, params[]) { if(Player[playerid][pHelper] == 1) { new ID, Motivo[40], string[70]; if(sscanf(params, "ds", ID, Motivo)) return SendClientMessage(playerid, 0xFFFFFFAA, "Digite /kick ID Motivo"); format(string, sizeof(string), "Vocк foi kickado [ Motivo %s ]", Motivo); SendClientMessage(ID, 0xFFFFFFAA, string); Kick(ID); } return 1; } CMD:sethelper(playerid, params[]) { if(IsPlayerAdmin(playerid)) { new ID; if(sscanf(params, "d", ID)) return SendClientMessage(playerid, 0xFFFFFFAA, "Digite /sethelper ID"); Player[ID][pHelper] = 1; } return 1; }
enum pInfo
{
pSkin,
pSenha,
pHelper,
pDG,
pMod
};
pInformacoes[MAX_PLAYERS][pInfo];
CMD:kickh(playerid, params[])
{
if(pInformacoes[playerid][pHelper] == 1)
{
new ID, Motivo[40], string[70];
if(sscanf(params, "ds[40]", ID, Motivo)) return SendClientMessage(playerid, 0xFFFFFFAA, "Digite /kick ID Motivo"); // qnd й string coloque s[tamanho]
format(string, sizeof(string), "Vocк foi kickado [ Motivo %s ]", Motivo);
SendClientMessage(ID, 0xFFFFFFAA, string);
Kick(ID);
}
return 1;
}
CMD:sethelper(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new ID;
if(sscanf(params, "d", ID)) return SendClientMessage(playerid, 0xFFFFFFAA, "Digite /sethelper ID");
pInformacoes[ID][pHelper] = 1; // Aqui vocк colocou errado em playerid vocк coloca o ID
}
return 1;
}
Renomeie a vбriavel: Player_Info[MAX_PLAYERS][pInfo]
para: Player[MAX_PLAYERS][pInfo] e substitua o seu cуdigo: Код:
CMD:kickh(playerid, params[]) { if(Player[playerid][pHelper] == 1) { new ID, Motivo[40], string[70]; if(sscanf(params, "ds", ID, Motivo)) return SendClientMessage(playerid, 0xFFFFFFAA, "Digite /kick ID Motivo"); format(string, sizeof(string), "Vocк foi kickado [ Motivo %s ]", Motivo); SendClientMessage(ID, 0xFFFFFFAA, string); Kick(ID); } return 1; } CMD:sethelper(playerid, params[]) { if(IsPlayerAdmin(playerid)) { new ID; if(sscanf(params, "d", ID)) return SendClientMessage(playerid, 0xFFFFFFAA, "Digite /sethelper ID"); Player[ID][pHelper] = 1; } return 1; } |
Que nada.. Estamos aqui para ajudar e ser ajudados
Agora quando for usar qualquer vбriavel inclusa na Enum utilize: Player[playerid][Variavel] |
como faзo pra salvar na pasta jogadores oq eu fiz os cargos que eu dei
|