Help I get THis error
#1

Hi i made this commands and when complie it says error on line this

Код:
C:\Users\Family\Desktop\UrbanRolePlay 0.3c\gamemodes\larp.pwn(79225) : error 017: undefined symbol "playerid"
C:\Users\Family\Desktop\UrbanRolePlay 0.3c\gamemodes\larp.pwn(79247) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#2

You need to post the code and the lines that the errors are in.
Reply
#3

You are using "playerid", but you didn't define what "playerid" is in the part of code you are trying to compile. Show lines 79225 and 79247.
Reply
#4

red lines are where error pops up
and im using ravens roleplay to test this.

Quote:

public FBIRightGatesOpen()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(FBIRightGateOpen == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 6)
{
MoveObject(FBIRightGate, -1781.65063477,971.39666748,31.50776672, 5);
FBIRightGateOpen =1;
SetTimer("FBIRightGatesClose",7000,0);
}
}
}
}

public FBILeftGatesOpen()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(FBILeftGateOpen == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 6)
{
MoveObject(FBILeftGate, -1781.49548340,996.09625244,31.50776672, 5);
FBILeftGateOpen =1;
SetTimer("FBILeftGatesClose",7000,0);
}
}
}
}

Thats are the lines with error
Reply
#5

use i instead.
Reply
#6

pawn Код:
public FBIRightGatesOpen()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
       if(FBIRightGateOpen == 0)
       {
           if(PlayerInfo[i][pAdmin] >= 6)
           {
               MoveObject(FBIRightGate, -1781.65063477,971.39666748,31.50776672, 5);
               FBIRightGateOpen =1;
               SetTimer("FBIRightGatesClose",7000,0);
           }
       }
    }
}

public FBILeftGatesOpen()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(FBILeftGateOpen == 0)
{
if(PlayerInfo[i][pAdmin] >= 6)
{
MoveObject(FBILeftGate, -1781.49548340,996.09625244,31.50776672, 5);
FBILeftGateOpen =1;
SetTimer("FBILeftGatesClose",7000,0);
}
}
}
}
Reply
#7

Quote:

use i instead.

where i put i >>?
Reply
#8

You needed to use "i" as Kin said. Also I can bet you count the opening brackets and then put the same number of closing brackets, indentation matters. Anyway here it is:

pawn Код:
public FBIRightGatesOpen()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(FBIRightGateOpen == 0)
        {
            if(PlayerInfo[i][pAdmin] >= 6)
            {
                MoveObject(FBIRightGate, -1781.65063477,971.39666748,31.50776672, 5);
                FBIRightGateOpen =1;
                SetTimer("FBIRightGatesClose",7000,0);
            }
        }
    }
}

public FBILeftGatesOpen()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(FBILeftGateOpen == 0)
        {
            if(PlayerInfo[i][pAdmin] >= 6)
            {
                MoveObject(FBILeftGate, -1781.49548340,996.09625244,31.50776672, 5);
                FBILeftGateOpen =1;
                SetTimer("FBILeftGatesClose",7000,0);
            }
        }
    }
}
EDIT: [L3th4l] beat me :P
Reply
#9

thanks [L3th4l] The complie work il just go make shure gate works
Reply
#10

got second question the hole thing works but the gates stays open why
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)