return error
#1

Hello when i compile my script im getting this warning but i dont know what is wrong with the command ?

Warning:
Код:
warning 209: function "cmd_giveweaponlic" should return a value
Command:
Код:
CMD:giveweaponlic(playerid, params[])
{
	if(IsACop(playerid))
	{
	    new giveplayerid;
	    if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /giveweaponlic [playerid]");
	    if(PlayerInfo[giveplayerid][pGunLic] == 0)
	    {
		    if(PlayerInfo[giveplayerid][pGunLic] == 0)
		    {
		        PlayerInfo[giveplayerid][pGunLic] = 1;
				SendClientMessage(playerid, COLOR_WHITE, "You have given a weapon license!");
		    }
			else
			{
			    SendClientMessage(playerid, COLOR_WHITE, "That person already got a weapon license!");
			}
		}
		return 1;
	}
}
Reply


Messages In This Thread
return error - by IndependentGaming - 09.02.2015, 21:29
Re: return error - by Sascha - 09.02.2015, 21:38
Re: return error - by IndependentGaming - 09.02.2015, 21:59
Re: return error - by Sascha - 09.02.2015, 22:09

Forum Jump:


Users browsing this thread: 3 Guest(s)