WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Help with tables. (https://www.wowinterface.com/forums/showthread.php?t=16607)

Raden101 06-04-08 08:45 PM

Help with tables.
 
Iv been tring to do this for some time now and i cant seem to find how to do it in any lua libs. or anything. i want to call strings from a table thats in a table

Code:

TB1 = {};

TB1[1] = {
    "I want to call this",
    "Or this",
    "Or even this"
};

and im trying to call it from this..

Code:

local Des1 = getglobal("Form".."Des1Label".."Label");
Des1:SetText(TB1.TB1[1].Key);

any help would be great thanks...



Moving to Lua help oops

zork 07-03-08 07:54 AM

I had the some issues with tables when writing rFilter2. This is what worked for me:

Code:
http://rothui.googlecode.com/svn/tru...2/rFilter2.lua

Code:

    rf2_spell_list = {
      buffs = {
        [1] = { tag = "battle", spellid = 2048, unit = "player", size = 32, fontsize = 24, posx = 0, posy = 0, framestrata = "BACKGROUND", anchor = "UIParent"},
        [2] = { tag = "commanding", spellid = 469, unit = "player", size = 32, fontsize = 24, posx = 40, posy = 0, framestrata = "BACKGROUND", anchor = "UIParent"},
      },

Code:

      for index,value in ipairs(rf2_spell_list.buffs) do
        local string = rf2_spell_list.buffs[index]
        addon:rf2_create_icon(string.spellid,"rf2_"..string.tag,string.size,string.fontsize,string.posx,string.posy,string.framestrata,string.anchor)
      end

Hope this is what you are looking for.

RiZLA 09-02-08 10:12 AM

Is this in the correct forum?
 
this seems like a very useful question/answer for general wow lua, so why is it posted in a forum dedicated to a project that died 2 years ago? :confused:

oh, I presume your "Moving to Lua help" failed, one way or another. :)

Seerah 09-02-08 10:27 AM

The project didn't die 2 years ago, it just hasn't seen much activity. There have been several updates to it, including one yesterday.

RiZLA 09-02-08 11:13 AM

o,rly?

so where is the download link maintained?
wowuides.wowinterface.com no longer works.

EDIT: ok I found it, should be added to the faq here or something :)
http://www.wowinterface.com/download...fo.php?id=4222


All times are GMT -6. The time now is 08:27 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI