Thread Tools Display Modes
Prev Previous Post   Next Post Next
11/18/14, 09:32 AM   #1
tangerine0469
Join Date: Nov 2014
Posts: 6
Exclamation Variable Dump

Hi,
first time add on developer here so please be nice and do not berate me for my question even if it sounds stupid/silly/useless/whatever...

I am trying to see all the variables available to an addon that may or may not be listed in the wiki. I know how to make a GUI (as ugly as my first attempts are they still work), make a settings menu and layout the add on files to work when activated. I just need help with the lua code on this as this is my first attempt at lua. I am a regular php/html/javascript user so I get the basics of programming. I did try to something I found on stackoverflow but that only gave me an error:

Link
Code:
function locals()
  local variables = {}
  local idx = 1
  while true do
    local ln, lv = debug.getlocal(2, idx)
    if ln ~= nil then
      variables[ln] = lv
    else
      break
    end
    idx = 1 + idx
  end
  return variables
end
I even tried to Butcher the counter tutorial code to display the variables btu that also ended in the same result. Lastly I have tried to call that (and several variations) function inside of the GUI by using:

Code:
<OnUpdate>
<OnInitialized>
<OnMouseDown>
Which met with either a few or repeating (in the case of the on update, my computer runs at 100 fps) errors






Edit:
I found something that may help me out and do what I want a little easier... the link for the addon is: http://www.esoui.com/downloads/info2...ctiontool.html I will post if it does or if I am still stuck later when I get home.

Last edited by tangerine0469 : 11/18/14 at 09:41 AM. Reason: found a usefull resource
  Reply With Quote
 

ESOUI » Developer Discussions » Lua/XML Help » Variable Dump


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off