Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
[API] API UnitFullName return a nil value for second argument
Freakz Forum Index
->
Trash Bin
->
WOW
->
Fixed / Closed bugs
Author
Message
637
Kkthnxbye
[KkthnxUI Developer]
Status: Offline
(since 24-12-2020 16:42)
Joined: 16 Nov 2011
Posts: 332
,
Topics: 175
Location:
Attempt to index local 'Location' (a nil value)
Reputation:
136.8
Votes
: 21
Posted: 26-01-2018, 00:23:18
| Translate post to:
... (
Click for more languages
)
WoW Freakz link: -
Bug description: Currently API UnitFullName does not return a proper value for the realm.
Proof:
https://i.imgur.com/zVkjDWB.jpg
https://i.imgur.com/CKZ9Vl8.jpg
This is how it returns on retail confirming it is an issue on freakz's felsong.
https://i.imgur.com/99TwiAe.jpg
So for example if I were to write something like this. It would not return the proper info and realm would return a nil value.
Code:
local FULLNAME, SHORTNAME do
function Module.PLAYER_LOGIN()
-- local name, realm = UnitFullName("player") -- Felsong does not return the proper info. So we will adjust it.
local name, realm = UnitName("player"), GetRealmName()
FULLNAME, SHORTNAME = name .. "-" .. realm, name
end
end
so I would have to rewrite and adjust all addon that use this to this.
Code:
local FULLNAME, SHORTNAME do
function Module.PLAYER_LOGIN()
local name, realm = UnitName("player"), GetRealmName() -- Felsong does not return the proper info. So we will adjust it. Currently Felsong does not return the realm info for `UnitFullName("player")`
FULLNAME, SHORTNAME = name .. "-" .. realm, name
end
end
You can test this in-game by running this.
Code:
/run print(UnitFullName("player"))
Success isn't what you've done compared to others. Success is what you've done compared to what you were made to do.
1
0
Back to top
Topic locked
Topic is closed, you cannot post any messages in it anymore
Freakz Forum Index
->
Trash Bin
->
WOW
->
Fixed / Closed bugs
The time now is 12-05-2025, 18:15:00
Copyright info
Based on phpBB
ro
/
com
B
Login
I forgot my password
World of Warcraft
Login for more...
Download WoW 7.3.5
Misc
eSports
Achievements
Buy reputation with votes
Reputation trades
Forum rules
Ban list
Members list
User guide (FAQ)
World of Warcraft
View details