SA-MP Forums Archive
Empty Statement? - 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: Empty Statement? (/showthread.php?tid=239294)



Empty Statement? - Max_Coldheart - 13.03.2011

Why Do I keep getting errors about this? Its not empty statement:
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 10, 2350.339843,-1181.649902,1027.976562));
The other line im getting errors too is this:
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 10, 1567.8489, -1898.0112, 13.5609));
These are the full codes:
pawn Код:
CMD:exit(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 10, 2350.339843,-1181.649902,1027.976562));
    {
        SetPlayerInterior(playerid, 0);
        SetPlayerPos(playerid, 1567.8489, -1898.0112, 13.5609);
        return 1;
    }
}
&
pawn Код:
CMD:enter(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 10, 1567.8489, -1898.0112, 13.5609));
    {
        SetPlayerInterior(playerid, 5);
        SetPlayerPos(playerid, 2350.339843,-1181.649902,1027.976562);
        return 1;
    }
}
how to fix


Re: Empty Statement? - iggy1 - 13.03.2011

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 10, 1567.8489, -1898.0112, 13.5609))
Don't use semicolons on conditionals! Its like doing this,

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 10, 1567.8489, -1898.0112, 13.5609))
{
    ;
}



Re: Empty Statement? - Burridge - 13.03.2011

Take the ";" off the end of those lines, you don't need them there.

So
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 10, 2350.339843,-1181.649902,1027.976562));
becomes
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 10, 2350.339843,-1181.649902,1027.976562))
EDIT: Beaten by above poster. Why don't I get alerted to a new post before I post? -.-'


Re: Empty Statement? - Max_Coldheart - 13.03.2011

oh shit I forgot that they dont need the semicolon. Thanks for help (: