Thread Tools Display Modes
07-03-06, 04:52 PM   #1
Porsus
A Kobold Labourer
Join Date: Jul 2006
Posts: 1
Question re. loading saved var file

I'm sorry if this has been already answered (I looked for the first 10 pp), but I'm having a hard time (after a lot of reading) of how to manage loading a previously saved and correctly formatted table.

Basically, I just want to load a saved file. I know I this is done sequentially after the mod has loaded (but not as real-time IO), but I can't anywhere's get a simple explanation of how to correctly call the table.

Is there no way to specify an existing data (table) file, and have it loaded into memory (as a var) and then do operations on it?

To be clear: I have a lua file with a table with data already in it -- I just want to be able to access it. I can't seem to find any operators or tricks, just ways to write new files {}. I don't expect any real-time file I/O (just call it from memory and display in a frame once maybe).

I've been up and down Curse and WoWwiki and http://wow.tentonhammer.com/index.ph...splay&ceid=357 and I really would appreciate some advanced help. Thanks.

Last edited by Porsus : 07-03-06 at 04:54 PM.
  Reply With Quote
07-05-06, 12:11 PM   #2
Iriel
Super Moderator
WoWInterface Super Mod
Featured
Join Date: Jun 2005
Posts: 578
The .lua file is just executed, so if it has:

BIGBADTABLE = {
["I like cheese"] = 1;
}

Then you'd be able to access

BIGBADTABLE["I like cheese"]

Once the ADDON_LOADED event fires for the addon whose saved variables contain that data.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Question re. loading saved var file


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