Help me with this: invalid function or declaration
#2

Your braces don't match up. The opening brace I marked in ORANGE has a closing brace I marked in RED and the last lines are below that closing brace and thus outside the callback and thus invalid.
Код:
forward OnPlayerModelSelection(playerid, response, listid, modelid);
public OnPlayerModelSelection(playerid, response, listid, modelid){
{
	if(listid == DUTYSKINS)
	{
	    if(response)
	    {
    		SetPlayerSkin(playerid, modelid);
   		}
	}
}
	if(listid == UNDERCOVERSKINS)
	{
	    if(response)
	    {
    		SetPlayerSkin(playerid, modelid);
   		}
	}
}
	if(listid == FDUTYSKINS)
	{
	    if(response)
	    {
	        SetPlayerSkin(playerid, modelid);
		}
	}
}
Solution: remove the red brace. The blue braces, while valid code, serve no purpose and can also be removed.
Reply


Messages In This Thread
Help me with this: invalid function or declaration - by RotAway - 11.07.2015, 13:36
Re: Help me with this: invalid function or declaration - by Vince - 11.07.2015, 13:47
Re: Help me with this: invalid function or declaration - by RotAway - 11.07.2015, 13:57

Forum Jump:


Users browsing this thread: 1 Guest(s)