06.02.2018, 18:23
TIL you can ignore parameters passed by reference (out parameters) by using a default value, just like you can with parameters passed by value (in parameters):
The default value can be anything, since it will be ignored anyway.
Use:
Код:
stock Float:DoSomething(playerid, &Float:a = 4.0) { a = 5.0; return 9.0; }
Use:
Код:
DoSomething(0); //Returns 9.0 new Float:a; DoSomething(0, a); //Returns 9.0 and variable 'a' contains 5.0