SA-MP Forums Archive
Help, Errors - 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: Help, Errors (/showthread.php?tid=156975)



Help, Errors - Luis- - 24.06.2010

I am making a Police Gate with a programme (( http://forum.sa-mp.com/index.php?topic=78211.0 )) but i got these errors i fixed most of them myself.

Код:
C:\Users\BooNii3\Geramia RP\Geramia RP Server\filterscripts\PD Gates.pwn(91) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
C:\Users\BooNii3\Geramia RP\Geramia RP Server\filterscripts\PD Gates.pwn(100) : error 001: expected token: ",", but found ";"
C:\Users\BooNii3\Geramia RP\Geramia RP Server\filterscripts\PD Gates.pwn(100) : error 036: empty statement
C:\Users\BooNii3\Geramia RP\Geramia RP Server\filterscripts\PD Gates.pwn(100) : error 029: invalid expression, assumed zero
C:\Users\BooNii3\Geramia RP\Geramia RP Server\filterscripts\PD Gates.pwn(100) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/opengate", cmdtext, true, 10) == 0)
    {
   if(!PlayerToPoint(10, playerid, CreateObject(969, 1584.2933349609, -1637.7700195313, 12.390459060669, 0.000000, 0.000000, 0.000000); )) { return 1; }
        if( == 0)
        {
         = 1;
                MoveObject(PD_Gate,CreateObject(969, 1591.6506347656, -1637.8186035156, 12.640459060669, 0.000000, 0.000000, 0.000000, 7);
        }
        else if( == 1)
        {
         = 0;
        MoveObject(,CreateObject(969, 1584.2933349609, -1637.7700195313, 12.390459060669, 0.000000, 0.000000, 0.000000, 7);
        }
        return 1;
    }
    return 0;
}



Re: Help, Errors - Luis- - 24.06.2010

Can i please get a response?


Re: Help, Errors - oliverrud - 24.06.2010

Which one is line 100?


Re: Help, Errors - Luis- - 24.06.2010

Line 100,
pawn Код:
if(!PlayerToPoint(10, playerid,CreateObject(969, 1591.6506347656, -1637.8186035156, 12.640459060669, 0.000000, 0.000000, 0.000000); )) { return 1; }



Re: Help, Errors - Kar - 24.06.2010

rofl find onplayerprivmsg and delete it


Re: Help, Errors - oliverrud - 24.06.2010

pawn Код:
if(!PlayerToPoint(10, playerid,CreateObject(969, 1591.6506347656, -1637.8186035156, 12.640459060669, 0.000000, 0.000000, 0.000000))) { return 1; }



Re: Help, Errors - Luis- - 24.06.2010

Quote:
Originally Posted by Kar
rofl find onplayerprivmsg and delete it
Deleted it, but still errors?

Quote:
Originally Posted by oliverrud
pawn Код:
if(!PlayerToPoint(10, playerid,CreateObject(969, 1591.6506347656, -1637.8186035156, 12.640459060669, 0.000000, 0.000000, 0.000000))) { return 1; }
Put it in my GM but still errors?


Re: Help, Errors - Kar - 24.06.2010

Quote:
Originally Posted by Luis_Geramia
Quote:
Originally Posted by Kar
rofl find onplayerprivmsg and delete it
Deleted it, but still errors?

Quote:
Originally Posted by oliverrud
pawn Код:
if(!PlayerToPoint(10, playerid,CreateObject(969, 1591.6506347656, -1637.8186035156, 12.640459060669, 0.000000, 0.000000, 0.000000))) { return 1; }
Put it in my GM but still errors?
onplayerprivmsg was to get rid of the warning. smart one..


Re: Help, Errors - Luis- - 24.06.2010

Quote:
Originally Posted by Kar
Quote:
Originally Posted by Luis_Geramia
Quote:
Originally Posted by Kar
rofl find onplayerprivmsg and delete it
Deleted it, but still errors?

Quote:
Originally Posted by oliverrud
pawn Код:
if(!PlayerToPoint(10, playerid,CreateObject(969, 1591.6506347656, -1637.8186035156, 12.640459060669, 0.000000, 0.000000, 0.000000))) { return 1; }
Put it in my GM but still errors?
onplayerprivmsg was to get rid of the warning. smart one..
Alright, Thanks


Re: Help, Errors - Luis- - 24.06.2010

pawn Код:
if( == 0)
That seems to cause the errors now,
Here is the code,

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/opengate", cmdtext, true, 10) == 0)
    {
        if(!PlayerToPoint(10, playerid,CreateObject(969, 1591.6506347656, -1637.8186035156, 12.640459060669, 0.000000, 0.000000, 0.000000))) { return 1; }
        if( == 0)
        {
         = 1;
        MoveObject(PD_Gate,CreateObject(969, 1584.2933349609, -1637.7700195313, 12.390459060669, 0.000000, 0.000000, 0.000000); //,7);
        }
        else if( == 1)
        {
         = 0;
        MoveObject(,CreateObject(969, 1591.6506347656, -1637.8186035156, 12.640459060669, 0.000000, 0.000000, 0.000000); //,7);
        }
        return 1;
    }
    return 0;
}