Complling.
#1

i want compile this code:
Код:
COMMAND:giveweapon(playerid, params[])
{
	if(!adminLevel(playerid, 3))
		return 0;
		
	new otherID, msg[128], weaponid;
	if(sscanf(params, "ud", otherID, weaponid))
	{
		Usage(playerid, "giveweapon <playerid> <weaponid>");
	}
		else
		{			
			if(!isConnected(otherID))
			{
				Server(playerid, "That player isn't logged in!");
				return 1;
			}
			
			if(isHigher(playerid, otherID))
				Server(playerid, "You can't use this command to that player.");
			else
			{
				format(msg, sizeof(msg), "give %s a weapon(%d).", GetName(otherID), weaponid);
				changeAlog(playerid, msg);
				GivePlayerWeapon(otherID, weaponid, 9999999);
				format(msg, sizeof(msg), "Administrator give you a weapon.");
				Server(otherID, msg);
				format(msg, sizeof(msg), "You have given "CHAT_YELLOW"%s(%d)"CHAT_WHITE" weapon(%d).", GetName(otherID), otherID, weaponid);
				Server(playerid, msg);
			}
		}
	}
	return 1;
}
But i got this:
Код:
C:\Documents and Settings\Administrateur\Bureau\Copie de CZ\pawno\include\cnr/admin.inc(33) : warning 209: function "cmd_giveweapon" should return a value
C:\Documents and Settings\Administrateur\Bureau\Copie de CZ\pawno\include\cnr/admin.inc(34) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply


Messages In This Thread
Complling. - by aymane123 - 31.12.2016, 19:58
Re: Complling. - by Konstantinos - 31.12.2016, 20:01
Re: Complling. - by aymane123 - 31.12.2016, 20:03
Re: Complling. - by Konstantinos - 31.12.2016, 20:10

Forum Jump:


Users browsing this thread: 1 Guest(s)