WoWInterface - View Single Post - Connecting action to button
View Single Post
11-15-21, 12:17 PM   #5
I did that?
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,510
Lua Code:
  1. local function fromGT(self)
  2.     print("Button Clicked!")
  3.     AutoStoreGuildBankItem(1,1);
  4. end
  6. UIConfig.GT1toBagButton:SetScript("OnClick", fromGT);

Adding the brackets to fromGT() in the SetScript means you a calling the function then as part of the SetScript rather than telling the SetScript to USE the function when the OnClick script is run.

Added a print so you can see if the function has been called.
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote