About return - 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: About return (
/showthread.php?tid=87715)
About return -
UsaBoy91 - 21.07.2009
pawn Код:
if(var[playerid] == 1)
{
SendClientMessage(playerid,COLOR_WHITE,"Your variable it's sets to 1.");
return 1;
}
SendClientMessage(playerid,COLOR_WHITE,"You exit the if statment.");
If i do like this , I'll recive that message : You exit the if statment ?
or i need to return 0; to don't recive it ?
Re: About return -
James_Alex - 21.07.2009
i think you must use "else"
Re: About return -
UsaBoy91 - 21.07.2009
I think you didn't understand me
Re: About return -
Jefff - 21.07.2009
No U dont, return 1; is blocking everything is down or use return 0; i dont know where u want to add this
Re: About return -
Abernethy - 21.07.2009
Umm, 1 is yes (positive), & 0 is no (negative) I think that is what you mean? & yes, returning 0 will make it not display.
Re: About return -
Donny_k - 22.07.2009
The return has nothing to do with the message dudes it's the statement above, if the array does indeed equal 1 then the return (true or false) will come into action and exit out of the callback/function but apart from that you will always see the message below, the return isn't in it's scope so it has nothing to do with it.