23.08.2013, 16:26
Forward is used when you create a new function.
You can use it if you want to create one like "SaveStats", so you should use:
On the other hand, stocks don't need forwards, so you can just use:
You can also use stock if you want to return some variable/string, cause forward and public won't allow you to do that:
You can use it if you want to create one like "SaveStats", so you should use:
pawn Код:
forward SaveStats(playerid);
public SaveStats(playerid)
{
// Stuff here...
return 1;
}
pawn Код:
stock SaveStats(playerid)
{
// Some other stuff...
return 1; // Not necessary...
}
pawn Код:
stock CreateString(playerid)
{
new string[256];
format(string, sizeof(string), "My ID is %d", playerid);
return string;
}