help me
#1

what is the problem in this?

Код:
	if (strcmp(string, "/setrank", true) == 0)
	{
		if (orgleader[playerid] == 0)
			return SendClientMessage2(playerid, COLOR_WHITE, "Error: You aren't the (co)leader of an organization.");
		new ID, rank[28];
		tmp = strtok(cmdtext, idx);
		if (!strlen(tmp)) return SendClientMessage2(playerid, COLOR_WHITE, "Usage: /setrank [playerid] [rank]");
		if (strlen(rank) > 28) return SendClientMessage(playerid, 0xFF0000FF,"The maximum rank length is 28 characters!");
		if (!IsPlayerConnected(ID)) return 1;
		if (GetPVarInt(giveplayerid, "playerorg") != GetPVarInt(playerid, "playerorg"))
			return SendPlayerFormattedText(playerid, COLOR_RED, "%s is not in your organization!", giveplayer, "");
		new string[120];
		format(string,sizeof(string),"Your leader %s has given you a rank: '%s'", PlayerName(playerid), rank);
		SendClientMessage(ID, 0xFFFF00FF, string);
		format(string,sizeof(string),"You have given a rank to %s (%s)", PlayerName(playerid), rank);
		SendClientMessage(playerid, 0xFFFF00FF, string);
		return 1;
	}
and i get this warrings

Код:
C:\Users\Nidhal\Desktop\moi\server\gamemodes\bb_freeroam.pwn(15733) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Nidhal\Desktop\moi\server\gamemodes\bb_freeroam.pwn(15734) : error 017: undefined symbol "PlayerName"
C:\Users\Nidhal\Desktop\moi\server\gamemodes\bb_freeroam.pwn(15736) : error 017: undefined symbol "PlayerName"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Reply


Messages In This Thread
help me - by mongi - 03.09.2015, 10:43
Re: help me - by jlalt - 03.09.2015, 10:49
Re: help me - by mongi - 03.09.2015, 11:19
Re: help me - by jlalt - 03.09.2015, 11:28
Re: help me - by Sjn - 03.09.2015, 11:34
Re: help me - by mongi - 03.09.2015, 11:37
Re: help me - by Sjn - 03.09.2015, 11:41
Re: help me - by mongi - 03.09.2015, 12:10

Forum Jump:


Users browsing this thread: 2 Guest(s)