View Single Post
01-15-24, 11:11 AM   #5
soulreeperxiii
A Murloc Raider
Join Date: Jan 2024
Posts: 4
Thanks for the help Xrystal, i appreciate it. I plugged your example into my code and managed to get it to run. This was exactly what I needed. However, I think I have a new problem now.

This works perfectly and outputs the expected index value in the Print function.
Lua Code:
  1. mysecurebutton:SetAttribute(
  2.     "_onclick",
  3.     [[
  4.         local index = self:GetAttribute( "craftselectionindex" )
  5.         print(index)
  6.     ]]
  7. )

This does absoluty nothing at all, no error when ran but also seems to not even perform the function.
Lua Code:
  1. mysecurebutton:SetAttribute(
  2.     "_onclick",
  3.     [[
  4.         local index = self:GetAttribute( "craftselectionindex" )
  5.         DoCraft(index)
  6.     ]]
  7. )

My guess is there is something more the defaut UI is doing for DoCraft() to function that I am not doing.
The Proteced message is not popping up but neither does it do anything.
Is there some type of logging mechanic I can use to see whats going on under the hood?
  Reply With Quote