SA-MP Forums Archive
return value help - 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)
+--- Thread: return value help (/showthread.php?tid=585268)



return value help - Armageddonz - 12.08.2015

can someone show me how return value work? i can't understand how it work on wiki...i saw someone put return 4 in their script...


Re: return value help - Crystallize - 12.08.2015

https://sampwiki.blast.hk/wiki/Control_Structures#return
return 1 = true
return 0 =false
"true" and "false" have a tag of "bool:" which give the compiler hints about where they can be used. 0 and 1 don't (they have the default tag, which is "_:"). (******)
return stops a function and goes back to the point in code which called the function in the first place(WIKI)