Display message for and only for a given error. menu

User Tag List

Results 1 to 3 of 3
  1. #1
    kivita's Avatar Member
    Reputation
    1
    Join Date
    Jun 2009
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Display message for and only for a given error.

    Hi ther eeveryone. My first post here... I'll apologize in advance for any nubbiness... I'm new to lua and wow ui.... but have experience in other scripting languages

    Anyhow... my current problem is I am trying to display a message for and only for the event that you get the error. "You are too far away!"


    Code:
    local frame2 = CreateFrame("Frame");
    frame2:RegisterEvent("UI_ERROR_MESSAGE");
    local function eventHandler(self, event, ...)
    print("Test " .. event); 
    end
    frame2:SetScript("OnEvent", eventHandler);

    so where i have print("Test " .. event); would i put something like if msg=="You are too far away" then blah blah blah?
    thanks for any help !
    Last edited by kivita; 06-07-2009 at 01:17 PM.

    Display message for and only for a given error.
  2. #2
    kivita's Avatar Member
    Reputation
    1
    Join Date
    Jun 2009
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Haha... would you look at that i figured it out myself!

    I was almost on the right track... I'll post this for anyone else who might be trying to do a similar thing....

    Code:
    function TargetInfoStuff()
    
    local frame2 = CreateFrame("Frame");
    frame2:RegisterEvent("UI_ERROR_MESSAGE");
      
    local function eventHandler(self, event, ...)
    
    if event == "UI_ERROR_MESSAGE" then
    
    local message = ...;
    
      if message == "You are too far away!" then
    
    --I put a bunch of code here 
    
     end
    
     if message == "You are facing the wrong way!" then
    
     -- aaaaand I put a bunch of code here 
    
     end
    
    end
    yay!!!

  3. #3
    Endron's Avatar Member
    Reputation
    7
    Join Date
    Jan 2008
    Posts
    23
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very handy, for anyone who dont have the time nor the scripting knowledge there is an addon called ErrorMonster which let you decide which errors that should be displayed.

Similar Threads

  1. [Selling] Level 30 (Unranked) Account. Tons of champs and skins. Message for info.
    By 70twinx in forum League of Legends Buy Sell Trade
    Replies: 0
    Last Post: 07-30-2014, 10:18 PM
  2. [Trading] LO BOOSTING CHEAP AND ONLY FOR PAYSAFES xD
    By ashanm10 in forum General MMO Buy Sell Trade
    Replies: 1
    Last Post: 07-21-2012, 08:02 PM
  3. [Misc] Fun and useful display ids for scripting or general fun
    By thebigman in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 04-30-2012, 08:09 PM
All times are GMT -5. The time now is 06:17 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search