27.04.2014, 21:35
Gente me ajuda com esses 3 erros
Vo postar as linhas dos erros
1 erro (23) : error 025: function heading differs from prototype
2 erro (101) : error 025: function heading differs from prototype
1 erros do HackDetect (553) : error 025: function heading differs from prototype
PHP код:
C:\Users\bruno\Desktop\meu server\[zS] ZoneSurvival\pawno\include\SS/Core/Player/Damage.pwn(23) : error 025: function heading differs from prototype
C:\Users\bruno\Desktop\meu server\[zS] ZoneSurvival\pawno\include\SS/Core/Player/Damage.pwn(101) : error 025: function heading differs from prototype
C:\Users\bruno\Desktop\meu server\[zS] ZoneSurvival\pawno\include\SS/Core/Admin/HackDetect.pwn(553) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Errors.
1 erro (23) : error 025: function heading differs from prototype
PHP код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)//linha do erro
{
if(IsPlayerOnAdminDuty(playerid))
return 0;
if(!IsPlayerSpawned(playerid))
return 0;
if(IsPlayerOnAdminDuty(issuerid))
return 0;
if(!IsPlayerSpawned(issuerid))
return 0;
if(issuerid == INVALID_PLAYER_ID)
{
if(weaponid == 53)
{
GivePlayerHP(playerid, -(amount * 0.1));
}
else
{
switch(weaponid)
{
case 37:
{
GivePlayerHP(playerid, -amount);
}
default:
{
if(amount > 10.0 && random(100) < amount)
{
if(IsPlayerUnderDrugEffect(playerid, DRUG_TYPE_ADRENALINE))
{
GivePlayerHP(playerid, -(amount * 0.5));
}
else
{
GivePlayerHP(playerid, -(amount * 1.1));
KnockOutPlayer(playerid, 5000);
}
}
}
}
}
return 1;
}
switch(weaponid)
{
case 31:
{
new model = GetVehicleModel(GetPlayerLastVehicle(playerid));
if(model == 447 || model == 476)
DamagePlayer(issuerid, playerid, WEAPON_VEHICLE_BULLET, bodypart);
}
case 38:
{
if(GetVehicleModel(GetPlayerLastVehicle(playerid)) == 425)
DamagePlayer(issuerid, playerid, WEAPON_VEHICLE_BULLET, bodypart);
}
case 49:
{
DamagePlayer(issuerid, playerid, WEAPON_VEHICLE_COLLISION, bodypart);
}
case 51:
{
new model = GetVehicleModel(GetPlayerLastVehicle(playerid));
if(model == 432 || model == 520 || model == 425)
DamagePlayer(issuerid, playerid, WEAPON_VEHICLE_EXPLOSIVE, bodypart);
}
}
return 1;
}
PHP код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)//essa linha 100
{//essa e a 101 linha do erro
if(IsPlayerOnAdminDuty(playerid))
return 0;
if(!IsPlayerSpawned(playerid))
return 0;
if(IsPlayerOnAdminDuty(damagedid))
return 0;
if(!IsPlayerSpawned(damagedid))
return 0;
DamagePlayer(playerid, damagedid, weaponid, bodypart);
return 1;
}
PHP код:
public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z)// linha do erro
{
if(GetTickCountDifference(GetTickCount(), vt_MovedFarTick[vehicleid]) < 5000)
return 1;
if(GetTickCountDifference(GetTickCount(), GetPlayerSpawnTick(playerid)) < 15000)
return 1;
if(GetTickCountDifference(GetTickCount(), GetPlayerVehicleExitTick(playerid)) < 5000)
return 1;
if(GetTickCountDifference(GetTickCount(), GetVehicleLastUseTick(vehicleid)) < 1000)
return 1;
if(IsVehicleOccupied(vehicleid))
return 1;
new
Float:x,
Float:y,
Float:z,
Float:distance;
GetVehiclePos(vehicleid, x, y, z);
distance = Distance(x, y, z, new_x, new_y, new_z);
if(IsNaN(distance))
{
RespawnVehicle(vehicleid);
return 1;
}
if(VEHICLE_TELEPORT_DISTANCE < distance < 500.0)
{
new Float:distancetoplayer = 10000.0;
vt_MovedFarPlayer[vehicleid] = GetClosestPlayerFromPoint(x, y, z, distancetoplayer);
if(distancetoplayer < 10.0)
{
vt_MovedFar[vehicleid] = true;
vt_MovedFarTick[vehicleid] = GetTickCount();
foreach(new i : veh_Index)
{
if(GetVehicleTrailer(i) == vehicleid)
return 1;
}
new
name[MAX_PLAYER_NAME],
model,
vehiclename[MAX_VEHICLE_NAME],
owner[MAX_PLAYER_NAME],
reason[128],
info[128];
GetPlayerName(vt_MovedFarPlayer[vehicleid], name, MAX_PLAYER_NAME);
model = GetVehicleModel(vehicleid);
GetVehicleName(model, vehiclename);
GetVehicleOwner(vehicleid, owner);
if(isnull(owner))
format(reason, sizeof(reason), "Teleported a %s %.0fm", vehiclename, distance);
else
format(reason, sizeof(reason), "Teleported a %s (%s's) %.0fm", vehiclename, owner, distance);
format(info, sizeof(info), "%f, %f, %f", new_x, new_y, new_z);
ReportPlayer(name, reason, -1, REPORT_TYPE_CARTELE, x, y, z, info);
// RespawnVehicle(vehicleid);
return 0;
}
}
return 1;
}