Empty Statement?
#1

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

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))
{
    ;
}
Reply
#3

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? -.-'
Reply
#4

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


Forum Jump:


Users browsing this thread: 1 Guest(s)