View Single Post
03-20-13, 05:39 PM   #29
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
The link text includes the opening "|H" so you'll want to change

Code:
    local LinkType = string.split(":", linkData)
to:

Code:
    local LinkType = strmatch(linkData, "|H(.-):")
to catch only what's between the opening "|H" and the first colon.

Also, you don't need your whole SetOrHookScript function... just use HookScript directly. If the frame doesn't already have a script of that type set, HookScript works exactly like SetScript.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote