Error With preventing players from entering vehicles -
daac - 03.04.2012
I get the errors:
C:\Users\col0037\Downloads\SAMP\gamemodes\tifzombi e.pwn(1038) : error 029: invalid expression, assumed zero
C:\Users\col0037\Downloads\SAMP\gamemodes\tifzombi e.pwn(1038) : warning 217: loose indentation
C:\Users\col0037\Downloads\SAMP\gamemodes\tifzombi e.pwn(1039) : error 017: undefined symbol "f"
C:\Users\col0037\Downloads\SAMP\gamemodes\tifzombi e.pwn(1040) : warning 217: loose indentation
From the code:
Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
Ѓ{
f(team[playerid] != 2) // Change this to how you deal with teams in your script
{
RemovePlayerFromVehicle(playerid);
}
}
}
Any solutions?
Re: Error With preventing players from entering vehicles -
blank. - 03.04.2012
f(team[playerid] != 2)
->
if(team[playerid] != 2)
Re: Error With preventing players from entering vehicles -
daac - 03.04.2012
Quote:
Originally Posted by blank.
f(team[playerid] != 2)
->
if(team[playerid] != 2)
|
I still get:
C:\Users\col0037\Downloads\SAMP\gamemodes\tifzombi e.pwn(1038) : error 029: invalid expression, assumed zero
C:\Users\col0037\Downloads\SAMP\gamemodes\tifzombi e.pwn(1038) : warning 217: loose indentation
Re: Error With preventing players from entering vehicles -
blank. - 03.04.2012
pawn Код:
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
RemovePlayerFromVehicle(playerid);
}
}
Does this work?
Re: Error With preventing players from entering vehicles -
daac - 03.04.2012
Quote:
Originally Posted by blank.
pawn Код:
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) { RemovePlayerFromVehicle(playerid); } }
Does this work?
|
But this code is supposed to prevent team 2 from entering vehicles......
Re: Error With preventing players from entering vehicles -
blank. - 03.04.2012
pawn Код:
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
if(team[playerid] == 2)
{
RemovePlayerFromVehicle(playerid);
}
}
Re: Error With preventing players from entering vehicles -
sjvt - 03.04.2012
pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
if(team[playerid] != 2) // Change this to how you deal with teams in your script
{
RemovePlayerFromVehicle(playerid);
}
}
return 1;
}
If it doesn't work then you use a different team system
Re: Error With preventing players from entering vehicles -
blank. - 03.04.2012
Quote:
Originally Posted by sjvt
pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate) { if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) { if(team[playerid] != 2) // Change this to how you deal with teams in your script { RemovePlayerFromVehicle(playerid); } } return 1; }
If it doesn't work then you use a different team system
|
How is that even remotely related?
Re: Error With preventing players from entering vehicles -
daac - 03.04.2012
Quote:
Originally Posted by sjvt
pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate) { if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) { if(team[playerid] != 2) // Change this to how you deal with teams in your script { RemovePlayerFromVehicle(playerid); } } return 1; }
If it doesn't work then you use a different team system
|
That doesn't work on these "basic" teams. It doesn't even make sense.
Re: Error With preventing players from entering vehicles -
sjvt - 03.04.2012
Quote:
Originally Posted by daac
That doesn't work on these "basic" teams. It doesn't even make sense.
|
I know if i watch the main post i see if(team[playerid] != 2) so i think he use that because he dont tell us how his team system works.