Magic Button

Magic Button

10.6k Downloads

Error loading file

DiscordGregory opened this issue ยท 2 comments

commented

Describe the bug
Lua error
3x Error loading MagicButton\Source\MagicButton-4.lua

To Reproduce
Steps to reproduce the behavior:
I updated to the latest version then just logged in and got that error.

My guess is because there's no code in the Lua file :)

commented

Go to the MagicButton addonfolder.
Edit your MagicButton.lua and copy and paste the code below in your file.

local MagicFrame = nil

function MagicButton()
  if AuctionHouseFrame.displayMode == AuctionHouseFrameDisplayMode.ItemSell then
    AuctionHouseFrame.ItemSellFrame:PostItem()
  end
  if AuctionHouseFrame.displayMode == AuctionHouseFrameDisplayMode.CommoditiesSell then
    AuctionHouseFrame.CommoditiesSellFrame:PostItem()
  end
  if AuctionHouseFrame.displayMode == AuctionHouseFrameDisplayMode.ItemBuy then
    AuctionHouseFrame.ItemBuyFrame.BuyoutFrame.BuyoutButton:Click()
    StaticPopup1Button1:Click()
  end
  if AuctionHouseFrame.displayMode == AuctionHouseFrameDisplayMode.Auctions then
    MagicButton_CancelAuctionMagic()
  end
end

function MagicButton_Print(message)
  print("|cc935e0ffMagic Button|r: " .. message)
end

local function CreateUndercutFrame()
  if not MagicButtonUndercutFrame then
    frame = CreateFrame(
      "FRAME",
      "MagicButtonUndercutFrame",
      nil,
      "MagicButtonUndercutFrameTemplate"
    )
  end
end

function MagicButton_CancelAuctionMagic()
  if not MagicButtonUndercutFrame then
    CreateUndercutFrame()
  end
  MagicButtonUndercutFrame:ButtonPress()
end

Thats the missing code, you can also find it when you browse through the github project.

I think @plusmouse will push a new build as soon as possible.

commented

Pushed a fix. Something went wrong with the curse build and wiped the file.