symbol is assigned a value that is never used
#1

(11591) : warning 204: symbol is assigned a value that is never used: "amount"
Reply
#2

what do you expect from us if you don't show code?
AFAIK, you are assigning a value to a variable which you aren't doing anything with afterwards.
Reply
#3

Код:
      		format(giveplayer, sizeof(giveplayer), "%s", PlayerName(targetid));
Reply
#4

can you show the entire code instead of 1 line
Reply
#5

Quote:
Originally Posted by JaydenJason
Посмотреть сообщение
can you show the entire code instead of 1 line
Код:
COMMAND:skick(playerid, params[])
{
	new text[128],targetid,string[256],sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME];
	if(sscanf(params, "us[128]", targetid, text)) SendClientMessage(playerid, COLOR_GREY, "USAGE: /skick [playerid] [reason]");
	else
	{
	    if (GetPVarInt(playerid, "PlayerLogged") == 0) return SendClientMessage(playerid, COLOR_WHITE, "You must be logged in to use this.");
	    if(!AdminUser(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to create a admin user, /admincreate.");
	    if(GetPVarInt(playerid, "AdminLogged") == 0) return SendClientMessage(playerid, COLOR_GREY, "You need to login into your admin account, /adminlogin.");
	    if (playerid == targetid) return SendClientMessage(playerid, COLOR_GREY, "You cannot do this to yourself.");
	    if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, "This player is not connected !");
	    if(IsPlayerNPC(targetid)) return SendClientMessage(playerid, COLOR_GREY, "Can't do this to a NPC.");
	    if(GetPVarInt(playerid, "Admin") <= 4 && GetPVarInt(targetid, "Admin") >= 1 && GetPVarInt(targetid, "Admin") <= 10) return SendClientMessage(playerid, COLOR_GREY, "You cant kick admins.");
		if(GetPVarInt(playerid, "Admin") >= 1)
		{
   			format(sendername, sizeof(sendername), "%s", AdminName(playerid));
      		format(giveplayer, sizeof(giveplayer), "%s", PlayerName(targetid));
      		GiveNameSpace(sendername);
      		GiveNameSpace(giveplayer);
      		if(GetPVarInt(playerid, "Admin") >= 11) sendername = "Hidden";
      		format(string, sizeof(string), "AdmCmd: %s was kicked by Admin %s Reason:[%s].", giveplayer, sendername, text);
			SendAdminMessage(COLOR_YELLOW, string);
			format(string, sizeof(string), "You were silent-kicked for the reason: [%s].", text);
			SendClientMessage(targetid, COLOR_WHITE, string);
			SetPVarInt(targetid, "Kicks", GetPVarInt(targetid, "Kicks")+1);
			KickEx(targetid);
		}
		else
		{
		    SendClientMessage(playerid, COLOR_LIGHTRED, "You do not have access to this command !");
		}
	}
	return 1;
}
Reply
#6

That is not the correct script block. I don't see where you declaired "amount" in there. Anyways try to find "new amount;" or ",amount"/", amount" and if you find one that is not used delete it. If you are not sure if it's being used or not. Just delete them one by one and if it shows you an other error press CTRL+ Z to cancel the changes.
Reply
#7

Since you're not using it, delete your "amount" variable at line 11591.
Use CTRL+G to go there.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)