Page 1 of 1

getting a weird error only on one character

Posted: Thu May 02, 2013 2:17 pm
by abron1

Code: Select all

12:13am - ...User/Desktop/micromacro/scripts/rom/classes/item.lua:141: attempt t
o concatenate global 'tmp' (a nil value)
can't find the item that is causing the error in my bag

Re: getting a weird error only on one character

Posted: Thu May 02, 2013 6:29 pm
by lisa
at line 140 put this

Code: Select all

if tmp == nil then tmp = "Im broken" end
Then do a name print of your inventory.

I usually have this as a userfunction

Code: Select all

function lisa_printinventory()
	local bags = {}
	inventory:update()
	for slot = 61, 240 do
		item = inventory.BagSlot[slot]
 	    if item.Available and  item.Name ~= "<EMPTY>" then
			table.insert(bags, {Name = item.Name, Id = item.Id, Rlevel = item.RequiredLvl, stats = item.Stats})
		end;
	end;
	table.print(bags)
end
The item with the name of "Im broken" will be the culprit.

Re: getting a weird error only on one character

Posted: Fri May 03, 2013 12:54 am
by rock5
I think that display should include the slot number otherwise how are you going to know which item it is? Count the lines?

Re: getting a weird error only on one character

Posted: Fri May 03, 2013 2:25 am
by lisa
that was just a userfunction I use normally, wasn't specifically made for this purpose.

It would be easy enough though to see the item before and after to know which item it is, the Id prints would also be important aswell I think.