error getAmmunitionCount r480

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
raff
Posts: 96
Joined: Thu Jan 22, 2009 10:46 am

error getAmmunitionCount r480

#1 Post by raff » Tue Jul 27, 2010 5:29 am

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)

VoidMain
Posts: 187
Joined: Wed Apr 21, 2010 12:21 pm

Re: error getAmmunitionCount r480

#2 Post by VoidMain » Tue Jul 27, 2010 9:06 am

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;

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 0 guests