SetTimer(ImortalPerson,100,true);
SetTimer(ImortalVehicle,100,true);
public OnPlayerSpawn(playerid)
{
SetPlayerHealth(playerid,1);
return 1;
}
public OnGameModeInit()
{
SetTimer(ImortalPerson,100,true);
SetTimer(ImortalVehicle,100,true);
return 1;
}
C:\Users\Mihailo\Desktop\Script Test Server\gamemodes\gm.pwn(110) : error 017: undefined symbol "ImortalPerson" C:\Users\Mihailo\Desktop\Script Test Server\gamemodes\gm.pwn(111) : error 017: undefined symbol "ImortalVehicle" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
C:\Users\Mihailo\Desktop\Script Test Server\gamemodes\gm.pwn(80) : error 076: syntax error in the expression, or invalid function call C:\Users\Mihailo\Desktop\Script Test Server\gamemodes\gm.pwn(81) : error 076: syntax error in the expression, or invalid function call C:\Users\Mihailo\Desktop\Script Test Server\gamemodes\gm.pwn(1508) : error 055: start of function body without function header C:\Users\Mihailo\Desktop\Script Test Server\gamemodes\gm.pwn(1510) : error 010: invalid function or declaration C:\Users\Mihailo\Desktop\Script Test Server\gamemodes\gm.pwn(1512) : error 010: invalid function or declaration C:\Users\Mihailo\Desktop\Script Test Server\gamemodes\gm.pwn(1514) : error 010: invalid function or declaration C:\Users\Mihailo\Desktop\Script Test Server\gamemodes\gm.pwn(1517) : error 010: invalid function or declaration C:\Users\Mihailo\Desktop\Script Test Server\gamemodes\gm.pwn(1527) : error 055: start of function body without function header C:\Users\Mihailo\Desktop\Script Test Server\gamemodes\gm.pwn(1528) : error 021: symbol already defined: "HP" C:\Users\Mihailo\Desktop\Script Test Server\gamemodes\gm.pwn(1529) : error 010: invalid function or declaration C:\Users\Mihailo\Desktop\Script Test Server\gamemodes\gm.pwn(1531) : error 010: invalid function or declaration C:\Users\Mihailo\Desktop\Script Test Server\gamemodes\gm.pwn(1538) : warning 203: symbol is never used: "HP" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 11 Errors.
SetTimer("ImortalPerson",100,true);
SetTimer("ImortalVehicle",100,true);
forward ImortalVehicle();
public ImortalVehicle()
{
//func.....
return 1;
}
#include <a_samp>
//public OnGameModeInit()
public OnFilterScriptInit()
{
SetTimer("godplayerorvehicle",1000,true);
return 1;
}
forward godplayerorvehicle();
public godplayerorvehicle()
{
new
MaxPlayers = GetMaxPlayers();
for(new i; i < MaxPlayers; i++)
{
if(!IsPlayerConnected(i)) continue;
new
Float:HP,
VehicleID = GetPlayerVehicleID(i);
if(VehicleID)
{
GetVehicleHealth(VehicleID, HP);
if(HP < 500) { RepairVehicle(VehicleID); }
} else {
GetPlayerHealth(i, HP);
if(HP < 99) { SetPlayerHealth(i, 100); }
}
}
return 1;
}
Originally Posted by Phento
pawn Код:
public ImortalVehicle() ; no pawn Код:
|
forward ImortalPerson();
public ImortalPerson()
{
new Float:HP,
vehicleid;
for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
if(!IsPlayerConnected(playerid)) continue;
GetPlayerHealth(playerid, HP);
if(HP < 100.0)
{
SetPlayerHealth(playerid, 100.0);
}
if(IsPlayerInAnyVehicle(playerid))
{
vehicleid = GetPlayerVehicleID(playerid);
GetVehicleHealth(vehicleid, HP);
if(HP < 1000.0)
{
SetVehicleHealth(vehicleid, 1000.0);
}
}
}
return 1;
}
public OnGameModeInit()
{
SetTimer("ImortalPerson", 1000, true);
}
Originally Posted by Finn
pawn Код:
pawn Код:
pawn Код:
|
C:\Users\Mihailo\Desktop\Script Test Server\gamemodes\gm.pwn(1519) : warning 235: public function lacks forward declaration (symbol "ImortalVehicle") Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning.
Originally Posted by Finn
Remove the public ImortalVehicle.
|
Originally Posted by Micko9
Quote:
|
forward ImortalVehicle(vehicleid);
Originally Posted by Kartowka
Quote:
Код:
forward ImortalVehicle(vehicleid); |
C:\Users\Mihailo\Desktop\Script Test Server\gamemodes\gm.pwn(1549) : warning 203: symbol is never used: "ImortalVehicle" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning.