WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   format(TEXT(PARENS_TEMPLATE)) replacement? (https://www.wowinterface.com/forums/showthread.php?t=57420)

kernighan 09-03-19 01:01 AM

format(TEXT(PARENS_TEMPLATE)) replacement?
 
In an old addon I'm getting up to current API syntax, I have the following line of code:

Code:

        rank_suffix = format(TEXT(PARENS_TEMPLATE), rank_suffix)
This apparently is no longer valid. Does anyone know what this should be replaced with these days?

Thanks!

kernighan 09-03-19 01:01 AM

Specifically, I get this error:

Code:

  attempt to call global 'TEXT' (a nil value)

Kanegasi 09-03-19 04:09 AM

I'm unfamiliar with the idiosyncrasies of how Lua worked back then. There was a TEXT function that was only there to feed it a string variable and spit it out as a return. Just remove it.

Code:

rank_suffix = format(PARENS_TEMPLATE, rank_suffix)

kernighan 09-03-19 07:38 AM

Quote:

Originally Posted by Kanegasi (Post 333551)
I'm unfamiliar with the idiosyncrasies of how Lua worked back then. There was a TEXT function that was only there to feed it a string variable and spit it out as a return. Just remove it.

Code:

rank_suffix = format(PARENS_TEMPLATE, rank_suffix)


great, thanks!

Fizzlemizz 09-03-19 09:49 AM

TEXT was one of those functions like getglobal/setglobal that found better mechanisms to replace them. TEXT was eventually removed (somewhere around MoP I think) whereas getglobal/setglobal still sit in the deprecated category.


All times are GMT -6. The time now is 04:33 PM.

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