Page 1 of 1

Autosell Error

Posted: Fri Dec 14, 2012 2:43 pm
by kenzu38
Hi guyz, can someone please help me? I get an error every time I run my script:

Code: Select all

	<!-- #  5 --><waypoint x="31846" z="3500" y="0">		player:merchant("Hammur Sorrun");
	</waypoint>
It always stops when the char attempts to sell something. The MM window gives this error:

Code: Select all

...pressed/micromacro/scripts/rom/classes/inventory.lua:480: attempt to index local 'stat' (a number value)
I am using userdefault xml profile that I modified like this:

Code: Select all

		<!-- Auto selling options when used with player:merchant -->
		<option name="INV_AUTOSELL_ENABLE"	value="true" />		<!-- true | false -->
		<option name="INV_AUTOSELL_FROMSLOT" value="1" /> 			<!-- 1 = bag 1 slot 1 -->
		<option name="INV_AUTOSELL_TOSLOT"	value="60" /> 			<!-- 30 = last slot bag 1 -->
		<option name="INV_AUTOSELL_QUALITY"	value="white,green,blue" /> 	<!-- white,green,blue,purple  -->
		<option name="INV_AUTOSELL_IGNORE"		value="Pfeil,Elementar" />
		<option name="INV_AUTOSELL_TYPES"		value="Weapons,Armor,Recipes" />
		<option name="INV_AUTOSELL_TYPES_NOSELL"	value="Cooking" />
		<option name="INV_AUTOSELL_NOSELL_STATSNUMBER"	value="3" />	<!-- Items with this number of named stats wont be sold  -->
		<option name="INV_AUTOSELL_NOSELL_DURA"      value="115" />
		<option name="INV_AUTOSELL_STATS_NOSELL"      value="X,XI" />
		<option name="INV_AUTOSELL_STATS_SELL"      value="IX" />
So can anyone point out what I am doing wrong? My Rombot is up to date and my RoM client is 5.0.5.2592. Thanks.

Re: Autosell Error

Posted: Fri Dec 14, 2012 5:58 pm
by lisa
the profile options seem ok, do you know which item it is trying to sell at the time or is it for all items?

You could try moving out any items to your bank that might look like they could cause the error.

Re: Autosell Error

Posted: Sat Dec 15, 2012 3:51 am
by rock5
Hm... there might be a bug in inventory.lua at line 477

Code: Select all

		for i,stat in pairs(_item) do
it should be

Code: Select all

		for i,stat in pairs(_item.Stats) do
Probably the reason it never came up is because probably no one uses INV_AUTOSELL_STATS_SELL.

Re: Autosell Error

Posted: Sat Dec 15, 2012 3:17 pm
by kenzu38
Thanks lisa and rock5 for helping.

I did what you suggested, rock, and it fixed the error. Thanks a lot!

Hope you don't forget about fixing this bug officially in the next revision. Again, thanks a lot!