Page 1 of 1
error getAmmunitionCount r480
Posted: Tue Jul 27, 2010 5:29 am
by raff
Hi,
I just updated to r480 and got this error:
Code: Select all
scripts\rom\bot.lua:408: attempt to call method 'getAmmunitionCount' (a nil value)
Re: error getAmmunitionCount r480
Posted: Tue Jul 27, 2010 9:06 am
by VoidMain
raff wrote:Hi,
I just updated to r480 and got this error:
Code: Select all
scripts\rom\bot.lua:408: attempt to call method 'getAmmunitionCount' (a nil value)
I'll send admin a patch for it now.
In the mean time, add this to line 72 of inventory.lua:
Code: Select all
function CInventory:getAmmunitionCount()
self.EquipSlots[ 9 ]:update(); -- 9 Ammunition slot
local count = self.EquipSlots[ 9 ].ItemCount;
if count == nil then
count = 0;
end;
return count;
end;