Gate Issue With Compileing
#1

Okay I get these errors
Код:
C:\Users\Robert\Desktop\SA-MP\gamemodes\skrp.pwn(1483) : warning 217: loose indentation
C:\Users\Robert\Desktop\SA-MP\gamemodes\skrp.pwn(1550) : error 001: expected token: ")", but found "-identifier-"
C:\Users\Robert\Desktop\SA-MP\gamemodes\skrp.pwn(1551) : error 001: expected token: ")", but found "-identifier-"
C:\Users\Robert\Desktop\SA-MP\gamemodes\skrp.pwn(1554) : error 017: undefined symbol "playerid"
C:\Users\Robert\Desktop\SA-MP\gamemodes\skrp.pwn(1558) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Top
Код:
forward GateCheck();
new LSPDFRONT;
new LSPDGARAGE;
self explaintory
Код:
public OnGameModeInit()
{
    LSPDFRONT = CreateObject(7657, 1542.5922851563, -1627.6103515625, 14.099655151367, 0, 0, 269.77499389648);
    LSPDGARAGE = CreateObject(10184, 1591.197265625, -1630.9213867188, 14.914584159851, 0, 0, 0);
    SetTimer("GateCheck",1000,1);
    return 1;
}
and the main code
Код:
public GateCheck()
{
    new LSPDFRONTOpen;
    new LSPDGARAGEOpen;
    for(new playerid; playerid<MAX_PLAYERS; playerid++)
    {
        if(IsPlayerInRangeOfPoint(playerid,10.0,1542.5922851563, -1627.6103515625, 14.099655151367)LSPDFRONTOpen=1;
        if(IsPlayerInRangeOfPoint(playerid,10.0,1591.197265625, -1630.9213867188, 14.914584159851)LSPDGARAGEOpen=1;
    }
    //LSPD FRONT
    if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 1)
	if(LSPDFRONTOpen)MoveObject(LSPDFRONT,1542.5922851563, -1627.6103515625, 8.099655151367,8); //These are the coordinates of the gate if it were in it's opened state.
    else MoveObject(LSPDFRONT,1542.5922851563, -1627.6103515625, 14.099655151367,8);//These are the coordinates of the gate if it were in it's closed state.
    //LSPD GARAGE
    if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 1)
	if(LSPDGARAGEOpen)MoveObject(LSPDGARAGE,1591.197265625, -1630.9213867188, 8.914584159851,8); //These are the coordinates of the gate if it were in it's opened state.
    else MoveObject(LSPDGARAGE, 1591.197265625, -1630.9213867188, 14.914584159851,8);//These are the coordinates of the gate if it were in it's closed state.
}
now the question is what did i screw up this time :P
Reply
#2

And which line is 1550?
Reply
#3

1550 is
Код:
        if(IsPlayerInRangeOfPoint(playerid,10.0,1542.5922851563, -1627.6103515625, 14.099655151367)LSPDFRONTOpen=1;
Reply
#4

Use some spaces and indents and the error would be simple to spot.

pawn Код:
if( IsPlayerInRangeOfPoint(playerid,10.0,1542.5922851563, -1627.6103515625, 14.099655151367) ) LSPDFRONTOpen = 1;
etc
Reply
#5

forward GateCheck();
must be
forward GateCheck(playerid);

and
public GateCheck()
must be
public GateCheck(playerid)

I hope this will help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)