WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   lists with variables? (https://www.wowinterface.com/forums/showthread.php?t=58255)

TransformedBG 10-06-20 07:24 PM

lists with variables?
 
is there a way to put a variable into a list? my brain aint working today...


ie:

Code:

some_list = {}
some_list["whatevre"] = {
"something something something " (some variable) " sometihng something.",
....
}

I mean other than a global variable thats made before it.. but if i wanted that variable to change more frequently.

DahkCeles 10-06-20 08:29 PM

I cannot tell if you are asking how to concatenate the text, or to pass a value 'by reference' into a table?


The concatenation operator is ..

"something something something" .. myVar .. "something something."




When you add the following to a table, it actually passes a reference or pointer to it:
- another table
- a function

But when you add the following to a table, it evaluates and passes the current value only:
- a number
- a string


All times are GMT -6. The time now is 11:29 AM.

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