Can you get the servers name?
I use Stuf Unit Frames and would like to replace the (*) that appears after a players name with the server name.
I'm sure I need to use the Custom Lua option but don't know the script :rolleyes: |
Try this:
GetServerName(); Code:
local serverName = GetServerName(); |
so simple, now I feel dumb :o
Thankyou :) |
um.. I must need something inside of the ()
This returns nothing: Code:
function(unit, cache, textframe) local servername = GetServerName() return servername end This returns Server Code:
function(unit, cache, textframe) local servername = "Server" return servername end now to find whats missing |
Are you looking for UnitName?
Code:
local name, realm = UnitName(unit) |
Hmm... you know, I thought the same thing. Looks like I'll have to delete that WoWWiki article with false information.
|
You can just use the function Blizzard adds in UnitFrame.lua:
Code:
function GetUnitName(unit, showServerName) |
So I think changing the code in core.lua will work better then trying the built in custom lua box.
I found this in core.lua Code:
local function GetUnitName(unit) Code:
local function GetUnitName(unit) |
That worked, Thank you for all the help!
|
All times are GMT -6. The time now is 02:32 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI