Thread Tools Display Modes
Prev Previous Post   Next Post Next
04-03-13, 09:58 AM   #1
kittykatmax
A Fallenroot Satyr
 
kittykatmax's Avatar
Join Date: Apr 2007
Posts: 21
Script conditionals?

I dual box and use two addons for it at this point. The script below works so I can tell my focus character to follow me (for the addon Useful Extras) even if they're from another realm or not in party/raid. The /followme in line 2 is for party members for the Hydra addon, which doesn't work cross realm or with characters not in party. My problem is that when I use this script and don't have a focus, it bugs and I get an error message stating, "SendChatMessage(): Whisper message missing target player!".

Is there a way to edit the initial script with some kind of [exists, help] conditional to fix this so I won't get errors when there's no focus or I have an enemy focus?

Thanks!


/run local n,r=UnitName"focus"n=n and n..(r and"-"..r or"")or""SendChatMessage("followme","WHISPER",nil,n);
/followme
  Reply With Quote
 

WoWInterface » AddOns, Compilations, Macros » Macro Help » Script conditionals?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off