08.01.2015, 05:49
Alguйm pode me ajudar? nгo consigo resolver este error, oque faзo??
pawn Код:
if (strcmp(cmd, "/checkweapons", true) == 0 || strcmp(cmd, "/checkw", true) == 0) //https://sampforum.blast.hk/showthread.php?pid=3318174#pid3318174&posted=1#post3318174
{
if (IsPlayerConnected(playerid))
{
new temp[256];
if (PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "ERRO: Vocк nгo tem nнvel administrativo suficiente.");
return true;
}
if (PlayerInfo[playerid][pAdminStats] != 0)
{
SendClientMessage(playerid, COLOR_GRAD1, "ERRO: Vocк nгo estб no modo admin! (/trabalhar)");
return true;
}
temp = strtok(cmdtext, idx);
if (!strlen(temp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USE: /checkweapons [ID/Nome]");
return true;
}
targetid = ReturnUser(temp); //erro aqui 26116
if (targetid == INVALID_PLAYER_ID) //erro aqui 26117
{
SendClientMessage(playerid, COLOR_GRAD1, "ID/Nome Invбlido.");
return true;
}
//Aqui declarei uma multi-variбvel para evitar a criaзгo de outra variбvel desnecessбria
new weapons[2][13];
format(string, sizeof(string), "Armas de %s:", GetPlayerNameRP(targetid)); //erro aqui 26125
SendClientMessage(playerid, COLOR_ADMIN_INFO, string);
for (new i = 0; i <= 12; i++)
{
GetPlayerWeaponData(targetid, i, weapons[0][i], weapons[1][i]); //erro aqui 26130
if (weapons[0][i] != 0)
{
format(string, sizeof(string), "%d: %d (%d)", i, weapons[0][i], weapons[1][i]);
SendClientMessage(playerid, COLOR_ADMIN_INFO, string);
}
}
}
return true;
}
Quote:
C:\Documents and Settings\P.Henrique\Desktop\Nova pasta\gamemodes\BSL.pwn(26116) : error 017: undefined symbol "targetid" C:\Documents and Settings\P.Henrique\Desktop\Nova pasta\gamemodes\BSL.pwn(26117) : error 017: undefined symbol "targetid" C:\Documents and Settings\P.Henrique\Desktop\Nova pasta\gamemodes\BSL.pwn(26125) : error 017: undefined symbol "targetid" C:\Documents and Settings\P.Henrique\Desktop\Nova pasta\gamemodes\BSL.pwn(26130) : error 017: undefined symbol "targetid" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase |