04.10.2009, 18:36
hey all today i have a stupid problem im trying to do gates to one team and i use this
public CheckGate()
{
for(new i = 0; i < GetMaxPlayers(); i++)
if (gTeam[playerid] == TEAM_COP)
{
if(PlayerToPoint(10.0, playerid, 1937.5629882813, 2152.091796875, 11.5703125) && OpenGate[i] == 0)
{
MoveObject(c_gate, 1937.5629882813, 2152.091796875, -11.5703125, 1);
OpenGate[i] = 1;
}
else if(!PlayerToPoint(10.0, playerid, 1937.5629882813, 2152.091796875, 11.5703125) && OpenGate[i] == 1)
{
MoveObject(c_gate, 1937.5629882813, 2152.091796875, 11.5703125, 1);
OpenGate[i] = 0;
}
}
}
but when i put copiling its says this errors
C:\Users\D4RK_T34M\Desktop\Gates.pwn(2046) : error 017: undefined symbol "playerid"
C:\Users\D4RK_T34M\Desktop\Gates.pwn(204 : error 017: undefined symbol "playerid"
C:\Users\D4RK_T34M\Desktop|Gates.pwn(2053) : error 017: undefined symbol "playerid"
dont worry about the lines bcs i have more things
public CheckGate()
{
for(new i = 0; i < GetMaxPlayers(); i++)
if (gTeam[playerid] == TEAM_COP)
{
if(PlayerToPoint(10.0, playerid, 1937.5629882813, 2152.091796875, 11.5703125) && OpenGate[i] == 0)
{
MoveObject(c_gate, 1937.5629882813, 2152.091796875, -11.5703125, 1);
OpenGate[i] = 1;
}
else if(!PlayerToPoint(10.0, playerid, 1937.5629882813, 2152.091796875, 11.5703125) && OpenGate[i] == 1)
{
MoveObject(c_gate, 1937.5629882813, 2152.091796875, 11.5703125, 1);
OpenGate[i] = 0;
}
}
}
but when i put copiling its says this errors
C:\Users\D4RK_T34M\Desktop\Gates.pwn(2046) : error 017: undefined symbol "playerid"
C:\Users\D4RK_T34M\Desktop\Gates.pwn(204 : error 017: undefined symbol "playerid"
C:\Users\D4RK_T34M\Desktop|Gates.pwn(2053) : error 017: undefined symbol "playerid"
dont worry about the lines bcs i have more things