Flags
#1

Hello everyone, I'm trying to learn to script and today I was facing a problem.

I wanted to create a dialog, which would flag a person when he has chosen the first option (0). But, I't gives me an error, to be sure I added the codes of the /flag command and the code I made.

The Error:
Код:
C:\Users\Vinay\Downloads\prestigerpnew.pwn(82173) : error 017: undefined symbol "giveplayerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
My code:
Код:
if(dialogid == 1992)
    {
        if(response)
        {
            if(listitem == 0)
            {
            SendClientMessage(playerid,COLOR_GREEN,"You have chosen a small house $500.000 has been taken from your pocket.");
            AddFlag(playerid, giveplayerid, "Small House");
            return 1;//Altijd op t einde
            }
		}
	}
The /flag code:
Код:
CMD:flag(playerid, params[])
{
	if (PlayerInfo[playerid][pAdmin] >= 2)
	{
		new string[128], giveplayerid, reason[64];
		if(sscanf(params, "us[64]", giveplayerid, reason)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /flag [playerid] [reason]");

		if(IsPlayerConnected(giveplayerid))
		{
			AddFlag(giveplayerid, playerid, reason);
			format(string, sizeof(string), "AdmCmd: %s was flagged by %s, reason: %s.", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid), reason);
			ABroadCast(COLOR_LIGHTRED, string, 2);
			return 1;

		}
	}
	else SendClientMessageEx(playerid, COLOR_GRAD1, "Invalid player specified.");
	return 1;
}
Any help would be really appreciated!
Reply


Messages In This Thread
Flags - by Vinninho - 17.03.2013, 16:40
Re: Flags - by Jstylezzz - 17.03.2013, 16:51
Re: Flags - by Vinninho - 17.03.2013, 16:59
Re: Flags - by Jstylezzz - 17.03.2013, 17:26
Re: Flags - by Vinninho - 17.03.2013, 17:42
Re: Flags - by kamzaf - 17.03.2013, 17:45

Forum Jump:


Users browsing this thread: 1 Guest(s)