[Tutorial] Less verbose function-making
#1

Are you tired of having to type so much just to create a function?

Instead, throw this code at the top of your script (under the includes).

pawn Code:
#define F:%0(%1)    forward %0(%1); \
                    public %0(%1)
This...
pawn Code:
forward KickPublic(playerid);
public KickPublic(playerid)
{
    Kick(playerid);
}
becomes this:

pawn Code:
F:KickPublic(playerid)
{
    Kick(playerid);
}
Just a simple text replacement. You can still call the functions, set them to timers, etc.
Reply


Messages In This Thread
Less verbose function-making - by Snipa - 17.06.2014, 01:37
Re: Less verbose function-making - by Ihateyou - 17.06.2014, 03:38
Re: Less verbose function-making - by Jack_Leslie - 17.06.2014, 08:14
Re: Less verbose function-making - by ]Rafaellos[ - 17.06.2014, 08:47
Re: Less verbose function-making - by Jack_Leslie - 17.06.2014, 11:01
Re: Less verbose function-making - by iZN - 17.06.2014, 11:05
Re: Less verbose function-making - by Snipa - 17.06.2014, 13:47
Re: Less verbose function-making - by Jack_Leslie - 18.06.2014, 03:52
Re : Less verbose function-making - by S4t3K - 18.06.2014, 09:52

Forum Jump:


Users browsing this thread: 2 Guest(s)