undefined Symbol - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: undefined Symbol (
/showthread.php?tid=430094)
undefined Symbol -
Blackazur - 12.04.2013
error: undefined symbol: "team"
How to fix that?
Код:
dcmd_cduel(playerid, params[])
{
#pragma unused params
if(team[playerid] == TEAM_HUMAN) {
if(g_HasInvitedToDuel[playerid] == 0)
return SendError(playerid, "You did not invite anyone to a duel!");
SendClientMessage(playerid, 0xFFFF00AA, "You have reset your duel invite, you can now use /duel [playerid] again.");
g_HasInvitedToDuel[playerid] = 0;
}
else return SendClientMessage(playerid,0xFFFF00AA," You cannot kill yourself if you are an zombie.");
return 1;
}
Re: undefined Symbol -
CoaPsyFactor - 12.04.2013
well, obviously you don't have new team[MAX_PLAYERS] in your script, it should be placed after all #includes
AW: undefined Symbol -
Blackazur - 12.04.2013
new team[MAX_PLAYERS];
I have it already.
Re: undefined Symbol -
CoaPsyFactor - 12.04.2013
but where do you have it? if it is in another function then this function (dcmd_cduel) doesn't know that variable exists. as I said it need to be defined out of any function, and before dcm_cduel
Re: undefined Symbol -
Faisal_khan - 12.04.2013
Use GetPlayerTeam(playerid), not team.