undefined Symbol
#1

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;
}
Reply
#2

well, obviously you don't have new team[MAX_PLAYERS] in your script, it should be placed after all #includes
Reply
#3

new team[MAX_PLAYERS];

I have it already.
Reply
#4

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
Reply
#5

Use GetPlayerTeam(playerid), not team.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)