User
Pass
2FA
 
 

[API] API UnitFullName return a nil value for second argument

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> WOW -> Fixed / Closed bugs
Author Message540
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

        Battletag: postrow.ID_BATTLE_NET}  KkthnxTV 
Post 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
View user's profile Send private message

  Topic locked


Topic is closed, you cannot post any messages in it anymore




 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> WOW -> Fixed / Closed bugs  


The time now is 28-04-2024, 21:40:55
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x