need small help +REP
#1

Well, I added when you setfamed to someone massage player ''Your Famed Status has been set to ...... by Admin ....'' now I got error ''giveplayerid''
Код:
error 017: undefined symbol "giveplayerid"
CMD codes:
Код:
CMD:setfamed(playerid, params[])
{
    if(PlayerInfo[playerid][pFamed] >= 6 || PlayerInfo[playerid][pAdmin] >= 1337)
    {
        new string[128], targetid, level;
	    if(sscanf(params, "ui", targetid, level)) {
			SendClientMessageEx(playerid, COLOR_GRAD1, "Usage: /setfamed [player] [level]");
			SendClientMessageEx(playerid, COLOR_GRAD2, "(1) Old-School - (2) Chartered Old-School - (3) Famed - (4) Famed Commissioner");
			SendClientMessageEx(playerid, COLOR_GRAD2, "(5) Vice-Chairman - (6) Chairman");
			return 1;
		}

		if(IsPlayerConnected(targetid))
		{
		    if(targetid != INVALID_PLAYER_ID)
		    {
		
			    if(PlayerInfo[targetid][pFamed] > PlayerInfo[playerid][pFamed])
			        return SendClientMessageEx(playerid, COLOR_GRAD1, "You cannot use this command on this person!");

			    PlayerInfo[targetid][pFamed] = level;
				format(string, sizeof(string), "AdmCmd: %s has set %s famed level to %d.", GetPlayerNameEx(playerid), GetPlayerNameEx(targetid), level);
				ABroadCast(COLOR_LIGHTRED, string, 2);
				SendClientMessage(giveplayerid,COLOR_WHITE, "Your Famed status has been set to %d by Admin %s", GetPlayerNameEx(targetid), level);
				SendFamedMessage(COLOR_LIGHTRED, string);
				Log("logs/setfamed.log", string);
			}
		}
		else return SendClientMessageEx(playerid, COLOR_WHITE, "You're not authorized to use this command!");
	}
	else return SendClientMessageEx(playerid, COLOR_GRAD1, "You're not authorized to use this command!");
	return 1;
}
Reply
#2

Clearly copied and pasted that code.

It tells you the issue: undefined symbol. Remove it.

You seriously need to do a bit of searching before creating a thread.
Reply
#3

What about reading the error? "giveplayerid" isn't defined.
You probably meant to use targetid.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)