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



Empty Statement Error. - ReneG - 24.12.2011

Hello, I was making /enter and /exit commands and all was well until I stumbled across this error upon compiling.
Код:
C:\Documents and Settings\Administrator\My Documents\BaseScript\BaseScript\gamemodes\test.pwn(113) : error 076: syntax error in the expression, or invalid function call
C:\Documents and Settings\Administrator\My Documents\BaseScript\BaseScript\gamemodes\test.pwn(113) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
>Exit code: 1    Time: 0.593
Here is the code, thanks.
pawn Код:
if(strcmp("/enter", cmdtext, true, 10) ==0)
    {
        if(IsPlayerInRangeOfPoint,10,2287.3159,2431.7764,10.8203))
        {
            SetPlayerVirtualWorld(playerid, 3);
            SetPlayerInterior(playerid, 3);
            SetPlayerPos(playerid, 238.8556,138.9318,1003.023);
        }
        return 1;
    }  
    return 0;
}



Re: Empty Statement Error. - Kar - 24.12.2011

pawn Код:
if(strcmp("/enter", cmdtext, true, 10) ==0)
    {
        if(IsPlayerInRangeOfPoint(10,2287.3159,2431.7764,10.8203))// you had ',' instead of '('
        {
            SetPlayerVirtualWorld(playerid, 3);
            SetPlayerInterior(playerid, 3);
            SetPlayerPos(playerid, 238.8556,138.9318,1003.023);
        }
        return 1;
    }  
    return 0;
}



Re: Empty Statement Error. - ReneG - 24.12.2011

Thank you very much, your code worked. +Rep