Quantcast format(TEXT(PARENS_TEMPLATE)) replacement? - WoWInterface
Thread Tools Display Modes
09-03-19, 01:01 AM   #1
kernighan
A Cyclonian
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 45
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!
  Reply With Quote
09-03-19, 01:01 AM   #2
kernighan
A Cyclonian
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 45
Specifically, I get this error:

Code:
   attempt to call global 'TEXT' (a nil value)
  Reply With Quote
09-03-19, 04:09 AM   #3
Kanegasi
An Onyxian Warder
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 394
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)
  Reply With Quote
09-03-19, 07:38 AM   #4
kernighan
A Cyclonian
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 45
Originally Posted by Kanegasi View Post
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!
  Reply With Quote
09-03-19, 09:49 AM   #5
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,133
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.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » format(TEXT(PARENS_TEMPLATE)) replacement?

Thread Tools
Display Modes

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