This site makes extensive use of JavaScript.
Please enable JavaScript in your browser.
Classic Theme
Thottbot Theme
Add-On Coding Help? Saved Variables
Post Reply
Return to board index
Post by
TheReal
Can someone with more coding experience than me please have a look at what I've done so far? I'm trying to use something like this:
-- If the variable isn't saved from last session...
if not (CM_db) then
-- ...create the table
CM_db = {}
end
print(type(CM_db)
...and the print() message I'm using to debug the program prints "nil" rather than "table."
I've attached a link for my add-on and I'm hoping someone can tell me why my debug message isn't printing "table." I need the table to save variables between sessions but I'm obviously doing something wrong. Please help.
=)
https://dl.dropbox.com/u/1118648/CurrencyMonitor.zip
Post by
Ketho
I guess you've already got your
answer
over on WoWI
Post by
TheReal
Can't edit my previous post, so here it is again with the intended edit added:
I guess you've already got your
answer
over on WoWI
If anyone wants to follow the discussion on WoWI, please feel free. At this exact moment though, my problem still persists even after making the
necessary
suggested changes.
=(
Edit: The problem was that I hadn't correctly registered the events my add-on cares about. I was trying to register them in the lua in an _OnLoad() function that was never called. By registering the events in the XML, it was problem solved.
Post Reply
You are not logged in. Please
log in
to post a reply or
register
if you don't already have an account.