if - return
#1

example

pawn Код:
if(playerinfo[playerid][plevel] > 1) return SendClientMessage(playerid, -1, "string");

if(playerinfo[playerid][plevel] > 1) SendClientMessage(playerid, -1, "string");
what change ? anything ?
Reply
#2

Return returns. What's so hard to understand about that? If you have a block of code underneath the statement it will execute if there isn't a return. It won't execute if there is.
Reply
#3

return stops a block of code from running.
Reply
#4

The link below might be off-topic but, it will help you understanding "return 0"

https://sampforum.blast.hk/showthread.php?tid=370127
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)