C:\Documents and Settings\Administrator\Desktop\SAMP\sampserver\gamemodes\Sky'sStunts'nStuff.pwn(718) : error 017: undefined symbol "playerid" C:\Documents and Settings\Administrator\Desktop\SAMP\sampserver\gamemodes\Sky'sStunts'nStuff.pwn(720) : error 017: undefined symbol "vehicleid" C:\Documents and Settings\Administrator\Desktop\SAMP\sampserver\gamemodes\Sky'sStunts'nStuff.pwn(722) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
forward WeaponsVehicleCheck(playerid, vehicleid);
public WeaponsVehicleCheck(playerid, vehicleid)
{ //etc..
C:\Documents and Settings\Administrator\Desktop\SAMP\sampserver\gamemodes\Sky'sStunts'nStuff.pwn(720) : warning 206: redundant test: constant expression is non-zero C:\Documents and Settings\Administrator\Desktop\SAMP\sampserver\gamemodes\Sky'sStunts'nStuff.pwn(722) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Warnings.
if(IsPlayerInAnyVehicle(i))
{
new veh = GetPlayerVehicleID(i);
if(GetVehicleModel(veh) == 432, 425, 520)//Don't think this is proper syntax
{
SetVehicleHealth(veh,0);
}
}
Originally Posted by ThePS3Guy
Here is the piece of script that contains the errors
http://pawno.pastebin.com/d68836762 here are the errors: Код:
C:\Documents and Settings\Administrator\Desktop\SAMP\sampserver\gamemodes\Sky'sStunts'nStuff.pwn(718) : error 017: undefined symbol "playerid" C:\Documents and Settings\Administrator\Desktop\SAMP\sampserver\gamemodes\Sky'sStunts'nStuff.pwn(720) : error 017: undefined symbol "vehicleid" C:\Documents and Settings\Administrator\Desktop\SAMP\sampserver\gamemodes\Sky'sStunts'nStuff.pwn(722) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors. b: explode their hydra/tank/hunter if they are out of the designated area, this is the part with the errors PS: at the top under gamemodeinit i have : SetTimer("WeaponsVehicleCheck", 5000, 1); which works |
stock IsPlayerInArea(playerid, Float:max_x, Float:min_x, Float:max_y, Float:min_y) { new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X, Y, Z); if(X <= max_x && X >= min_x && Y <= max_y && Y >= min_y) return 1; return 0; } forward WeaponsVehicleCheck(); public WeaponsVehicleCheck() { for(new i; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(!IsPlayerInArea(i,423.9233, 56.4679, 2138.4824, 1681.4557)) { if(IsPlayerInAnyVehicle(i)) { new CarID = GetPlayerVehicleID(i); if(GetVehicleModel(CarID) == 432 || 425 || 520) { SetVehicleHealth(CarID,0.0); } } ResetPlayerWeapons(i); } } } }
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(GetVehicleModel(vehicleid) == 432 || GetVehicleModel(vehicleid) == 425 || GetVehicleModel(vehicleid) == 520)
{
if(ispassenger)
{
return 1;
}
else
{
SendClientMessage(playerid, c_r, "[ ! ] Nobody can enter these vehicles !");
GetPlayerPos(playerid,Float:LocX,Float:LocY,Float:LocZ);
SetPlayerPos(playerid,Float:LocX,Float:LocY,Float:LocZ);
return 1;
}
}
return 1;
}