About return
#1

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 ?
Reply
#2

i think you must use "else"
Reply
#3

I think you didn't understand me
Reply
#4

No U dont, return 1; is blocking everything is down or use return 0; i dont know where u want to add this
Reply
#5

Umm, 1 is yes (positive), & 0 is no (negative) I think that is what you mean? & yes, returning 0 will make it not display.
Reply
#6

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)