06.09.2012, 20:23
Today i learnt that i can use named parameters instead of ordered parameters, which is more cool and readable than the ordered style.
E.g you have a teleport function:
If you use the old style you have to write all parameters:
But with named, you dont have to write the 4th parameter:
I think many developer will use this :P
E.g you have a teleport function:
pawn Код:
stock Teleport(playerid, Float:x, Float:y, Float:z, Int = -1, VW = -1)
{
some code...
}
pawn Код:
Teleport(playerid, 1.0, 2.0, 3.0, -1, 5);
pawn Код:
Teleport(playerid, 1.0, 2.0, 3.0, .VW = 5);

