Thread Tools Display Modes
06-04-08, 09:04 PM   #1
Raden101
A Murloc Raider
Join Date: May 2008
Posts: 5
Question Table in table Calling??

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...
  Reply With Quote
06-05-08, 03:32 AM   #2
Slakah
A Molten Giant
 
Slakah's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 863
Code:
print(TB1[1][1])
would give you "I want to call this".

Code:
print(TB1[1][2])
would give you "Or this".

Code:
print(TB1[1][3])
would give you "Or even this".

Take a look at http://lua-users.org/wiki/TablesTutorial

Last edited by Slakah : 06-05-08 at 03:36 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Table in table Calling??


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