I am using this mutator but it generates the following two errors making the log file massive.
I would like to fix it. But i am not a coder. I have no problems decompiling or compiling, just dont understand the structure of classes. Sometimes i can get lucky and make the correct changes, but not this time. Here is the code.
Code:
Warning: MutAmmo KF-Bedlam.MutAmmo (Function MutAmmo.MutAmmo.GiveAmmo:001C) Accessed None 'Human'
Warning: MutAmmo KF-Bedlam.MutAmmo (Function MutAmmo.MutAmmo.GiveAmmo:001C) Accessed None 'Human'
Warning: MutAmmo KF-Bedlam.MutAmmo (Function MutAmmo.MutAmmo.GiveAmmo:001C) Accessed None 'Human'
Warning: MutAmmo KF-Bedlam.MutAmmo (Function MutAmmo.MutAmmo.GiveAmmo:001C) Accessed None 'Human'
Warning: MutAmmo KF-Bedlam.MutAmmo (Function MutAmmo.MutAmmo.GiveAmmo:001C) Accessed None 'Human'
Warning: MutAmmo KF-Bedlam.MutAmmo (Function MutAmmo.MutAmmo.GiveAmmo:003E) Accessed None 'Inv'
Warning: MutAmmo KF-Bedlam.MutAmmo (Function MutAmmo.MutAmmo.GiveAmmo:0051) Accessed None 'Inv'
Warning: MutAmmo KF-Bedlam.MutAmmo (Function MutAmmo.MutAmmo.GiveAmmo:003E) Accessed None 'Inv'
I would like to fix it. But i am not a coder. I have no problems decompiling or compiling, just dont understand the structure of classes. Sometimes i can get lucky and make the correct changes, but not this time. Here is the code.
Code:
//=============================================================================
// MutAmmo - Unlimited 9mm ammo - By EvilDooinz aka Bruce303lee
//=============================================================================
class MutAmmo extends Mutator;
event PreBeginPlay()
{
SetTimer(1.0,true);
}
function Timer()
{
local Controller C;
for (C = Level.ControllerList; C != None; C = C.NextController)
{
ModifyPawn(C.Pawn);
}
}
static simulated function ModifyPawn(Pawn Other)
{
local int AddAmmo;
AddAmmo = 10 + Rand(51);
GiveAmmo(Other, AddAmmo);
}
static function GiveAmmo(Pawn pawn,float Percentage)
{
local KFHumanPawn human;
Local Inventory Inv;
human = KFHumanPawn(pawn);
for (Inv = human.Inventory; Inv != None; Inv = Inv.Inventory)
{
if (KFAmmunition(Inv).AmmoAmount < KFAmmunition(Inv).MaxAmmo)
KFAmmunition(Inv).AmmoAmount = KFAmmunition(Inv).MaxAmmo;
}
}
defaultproperties
{
GroupName="KF-Ammo"
FriendlyName="Ammo Regen"
Description="All weapons have unlimited ammunition"
}
Last edited: