Larsey123IsMe
Unregistered
Quote:
Originally Posted by JaTochNietDan
Well I recognize the strange syntax, I'm pretty sure I've seen you use it somewhere else before
I've seen you do this:
pawn Code:
if(something != something) SendClientMessage(playerid,color,"Error, can't do that"); { print("Can do that!"); // Really can't }
Those brackets mean nothing, they aren't part of the if statement. This means that the code in them will always be run, even if the if statement is deemed true or false! Proper syntax would be either returning SendClientMessage to stop the rest of the code from running, or using a simple else statement. Like so:
Example #1:
pawn Code:
if(something != something) return SendClientMessage(playerid,color,"Error, can't do that"); print("Can do that!");
Example #2:
pawn Code:
if(something != something) SendClientMessage(playerid,color,"Error, can't do that"); else { print("Can do that!"); }
I hope that helps you with avoiding future syntax problems
|
(Y)
You know what? You is AWESOME
It helped a lot
And.. Thanks AGAIN! xD ahah :P