[Tutorial] Creating cleaner and more read-able code
#4

Quote:
Originally Posted by CalvinC
View Post
And just change it into this:
pawn Code:
else SendClientMessage(targetid, -1, "PM Received."); SendClientMessage(playerid, -1, "PM Sent");
If you don't use brackets only the first next line is taken (a line ends with the breaking operator ";")
Therefor only the first SendClientMessage is included in the else

To do this right you should either use brackets for more than one function or you use a normal comma ","
pawn Code:
else SendClientMessage(targetid, -1, "PM Received."), SendClientMessage(playerid, -1, "PM Sent");
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)