MACRO: Why doesn't this work?

MACRO: Why doesn't this work?

by Clownster » Wed Apr 27, 2016 11:44 am

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
User avatar
Clownster
Tester
 

Re: MACRO: Why doesn't this work?

by Renew » Wed Apr 27, 2016 12:32 pm

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 :)
my Addons:
- Vanilla Healing Assignments - /viewtopic.php?f=63&t=23326
- Vanilla Storyline -
User avatar
Renew
Senior Sergeant
Senior Sergeant
 

Re: MACRO: Why doesn't this work?

by Andraxion » Fri Apr 29, 2016 12:49 am

GetContainerItemID wasn't added until 3.x.
Tinkleflower (PvE)
Andraxion's Addon Collection [Updated and refreshed]
Taking requests for backporting addons to 1.12, though I cannot give timeframes and I'm not currently undertaking very large projects.
User avatar
Andraxion
Grunt
Grunt
 


Return to Addons & macros