SA-MP Forums Archive
What does Return; do? - 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: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: What does Return; do? (/showthread.php?tid=113982)



What does Return; do? - Nameless303 - 17.12.2009

Hi,
In the Rivershell is there a piece of code with return;..
Does anyone know what this means? I thought you always have to return something?


Re: What does Return; do? - bigcomfycouch - 17.12.2009

It's not always required to return a value. That's really only needed in a callback or when you return with a function call e.g.

Код:
return doSomething(var);
You'd also have to return a value, usually being it 1 or 0; it doesn't matter if the function has no specific return value needed, though.


Re: What does Return; do? - Malice - 17.12.2009

http://forum.sa-mp.com/index.php?top...1257#msg841257