SA-MP Forums Archive
Useless returns? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Discussion (https://sampforum.blast.hk/forumdisplay.php?fid=84)
+---- Thread: Useless returns? (/showthread.php?tid=516132)



Useless returns? - GWMPT - 29.05.2014

Well.. it came to my attention that we have some functions which have return, and others from the same "kind" without returns.

Example:
pawn Code:
SetPlayerHealth(playerid, float:amount);
doesn't return any kind of value, when
pawn Code:
SetPlayerArmour(playerid, float:amount);
will return 1 or 0.
[Well, I've found this in the wiki... not sure if these functions were updated or not]

What am I supposed to do, suppress the return of SetPlayerArmour or...?


Re: Useless returns? - im - 29.05.2014

Edit: I need to read the topic before posting.


Re: Useless returns? - Ihateyou - 29.05.2014

dont worry about it


Re: Useless returns? - GWMPT - 30.05.2014

Quote:
Originally Posted by Y_Less
View Post
What do you mean "suppress" the return? You can't do anything about the returns from natives beyond ignore them if you want. As it happens, most functions DO return something - most player functions return 0 when the player isn't connected and 1 when they are, even those that aren't documented as such. The way the language works means that ALL natives return something.
What i meant was ignoring the return of the function, sorry.

Anyways, thanks for your reply[the text in bold].