View Single Post
08-20-14, 08:49 PM   #3
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Kygo View Post
Did react to something (maybe it's supposed to happen?) when i wrote this
(Using Notepad++ with language set to LUA)
There is a global "time" function in Lua. Since you're not using it anywhere in your code, it doesn't matter, but if you prefer your editor not highlight it as a built-in global, just use another name.

Originally Posted by Kygo View Post
Are you refering to "local function auras_PostUpdateIcon.."?
Yes.

Originally Posted by Kygo View Post
So something like this: "time:SetFormattedText(m:s)" ?
fontstring:SetFormattedText(...) is the same as (but faster than) doing fontstring:SetText(string.format(...)) so just refer to the documentation for string.format to see what arguments you need to provide:

http://wowpedia.org/API_format
https://www.gnu.org/software/libc/ma...nt-Conversions

Or just look at other addons that display formatted time strings:

https://github.com/haste/oUF/blob/ma...stbar.lua#L371
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote