SA-MP Forums Archive
return true vs return 1 +rep - 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 true vs return 1 +rep (/showthread.php?tid=315205)



return true vs return 1 +rep - genesis87 - 02.02.2012

hey,
what is the difference between return 1 and return true ?

which one should i use?


Re: return true vs return 1 +rep - Wesley221 - 02.02.2012

Theyre both the same. True == 1.

Only with booleans you can ONLY use true/false, and not 1/0.


Re: return true vs return 1 +rep - TheLazySloth - 02.02.2012

In all scripting languages,
True == 1
False == 0

Doesn't matter which you use to return your functions.


Re: return true vs return 1 +rep - genesis87 - 02.02.2012

thanks guys.
+rep given