09.01.2013, 11:57
Which the difference between
pawn Код:
forward Test(playerid);
public Test(playerid)
{
SendClientMessage(playerid, ~1, "test");
return 1;
}
pawn Код:
forward Test(playerid);
public Test(playerid)
{
SendClientMessage(playerid, ~1, "test");
}
The same case in plain functions:
pawn Код:
Test(playerid)
{
SendClientMessage(playerid, ~1, "test");
return 1;
}
pawn Код:
Test(playerid)
{
SendClientMessage(playerid, ~1, "test");
}
Which is the difference?
I already know that if I need a value I can return it with return but in void functions, in pawn doesn't exist void so, in void functions that executes 1 time and don't need to return any value.
like
Case with callback:
pawn Код:
public OnPlayerConnect(playerid)
{
SetTimerEx("Test", 1000, false, "d", playerid);
return 1;
}
Case with plain function:
pawn Код:
public OnPlayerConnect(playerid)
{
Test(playerid);
return 1;
}
I need to return a value in the Test function in both cases?
Thanks and respond only people that have understanded my doubt and have experience with this cases to avoid confusions.
Thanks again.