+ Reply to Thread
Results 1 to 11 of 11

  Click here to go to the first Rift Team post in this thread.   Thread: Inspect.Unit.Detail(unit) not working

  1. #1
    Ascendant Credo's Avatar
    Join Date
    Jan 2011
    Posts
    4,172

    Default Inspect.Unit.Detail(unit) not working

    Even if I enter the unit ID number in manually it always returns nil. It was working a few days ago, but now it's not.
    Even free cost too much now

  2. #2
    Ascendant Credo's Avatar
    Join Date
    Jan 2011
    Posts
    4,172

    Default

    Now if I logged out of a character and back in I will get the name but nothing else from Inspect.Unit.Detail

    Using:
    a = Inspect.Unit.Detail("player")
    dump(a)

    Gives:
    {name = "NAME"}
    Even free cost too much now

  3.   This is the last Rift Team post in this thread.   #3
    Rift Team
    Join Date
    Oct 2010
    Posts
    927

    Default

    Is this on live or PTS? Live hasn't changed for quite a while.

  4. #4
    Champion
    Join Date
    Jun 2011
    Posts
    561

    Default

    I'd say PTS cause getting player's faction from Inspect.Unit.Detail() works on Live. However I didn't see any problems with that function when I worked on my addons on PTS this weekend.

    Cheers
    N.

  5. #5
    Ascendant Credo's Avatar
    Join Date
    Jan 2011
    Posts
    4,172

    Default

    Both live and PTS, but what's weird is I other addons I use work fine. I downloaded an addon that uses Inspect.Unit.Detail and it seemed to work fine. Time to figure out what's wrong with my code . Thanks for the replies.
    Even free cost too much now

  6. #6
    Rift Disciple chuckySTAR's Avatar
    Join Date
    Feb 2011
    Posts
    152

    Default

    This function returns nil if the given unit isn't accessible via unit specifiers like "player.target, ..."

  7. #7
    Sword of Telara Semele's Avatar
    Join Date
    Mar 2011
    Posts
    872

    Default

    The unit needs to be Available (see Event.Unit.Available and Event.Unit.Unavailable) in order to return any Details. As chucky mentioned.

    If .Detail returns nill. This means you, nor any of your group or raid members have that target selected. It will also become available to you personally if you mouse-over or have the unit as your focus.
    Rank 76 Guardian Mage

  8. #8
    Ascendant Credo's Avatar
    Join Date
    Jan 2011
    Posts
    4,172

    Default

    So if I want an addon to automatically track achievements when the player enters a zone they have to target their avatar to get this function to work?
    Even free cost too much now

  9. #9
    Sword of Telara Semele's Avatar
    Join Date
    Mar 2011
    Posts
    872

    Default

    Quote Originally Posted by Credo View Post
    So if I want an addon to automatically track achievements when the player enters a zone they have to target their avatar to get this function to work?
    "player" becomes available depending on loading times. When you start rift, reloadui or port/zone in. You need to wait until the player becomes available. For example, if Event.Unit.Available includes Player UID then run your checking code.
    Rank 76 Guardian Mage

  10. #10
    Ascendant Credo's Avatar
    Join Date
    Jan 2011
    Posts
    4,172

    Default

    I'll give that a try, thanks! I'm still learning how to work with events, but I can probably figure it out.
    Even free cost too much now

  11. #11
    Ascendant Credo's Avatar
    Join Date
    Jan 2011
    Posts
    4,172

    Default

    I got it working, thanks again guys!(gals! if applicable)
    Even free cost too much now

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts