Page 1 of 1

MACRO: Why doesn't this work?

PostPosted: Wed Apr 27, 2016 11:44 am
by Clownster
Hi, this doesn't seem to work for some reason.. can someone pls tell me what's wrong? It's basically just a macro I pulled off a forum that is supposed to move a certain item to a specific bag slot.

Error: attempt to call global `GetContainerItemID' (a nil value)
String: for b=0,4 do for s=1,GetContainerNumSlots(b...
Count: 5

This is the error I get (this macro worked just fine for whoever used it in 2011, and afaik everything used in this macro existed back in 1.12 as well)

/run for b=0,4 do for s=1,GetContainerNumSlots(b) do local i=GetContainerItemID(b,s)if i then local n=GetItemInfo(i)if n=="ITEM"then PickupContainerItem(b,s)PickupContainerItem(bag,slot of choice)end end end end

Re: MACRO: Why doesn't this work?

PostPosted: Wed Apr 27, 2016 12:32 pm
by Renew
Clownster wrote:Error: attempt to call global `GetContainerItemID' (a nil value)


says that the function (all blizzard functions are global) does not exist...i guess this macro wont work in vanilla :)

Re: MACRO: Why doesn't this work?

PostPosted: Fri Apr 29, 2016 12:49 am
by Andraxion
GetContainerItemID wasn't added until 3.x.