17.03.2013, 16:40
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:
My code:
The /flag code:
Any help would be really appreciated!
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.
Код:
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 } } }
Код:
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; }