Search code examples
luaworld-of-warcraft

WoW lua get GUID from character name


I'm trying to do this basically

x = UnitGUID(nameOfCharacter)

But it doesn't work. It works to get my own GUID using "player" such as

x = UnitGUID("player") 

This is being used with the CHAT_MSG_WHISPER event which states it returns the sender GUID but it doesn't.

Any ideas or is it just not possible? Thanks


Solution

  • Is the other player in your party/raid? At least according to Wowpedia, you can only use the char names of group members as a UnitId.