1. Greetings everyone.

    I'm working at creating SnD timer AddOn , I used SPELLCAST_STOP event for tracking SnD "cast". Every time I use any spell I got an UI error "string not found"

    Should I use SPELLCASTSTART and SPELLCASTSTOP both?

    Or there is any mistake in this code?

        if (event == "SPELLCAST_STOP") then 
        if (string.find ("Slice and Dice")) then 
            Event() 
        end   
     ``
    

    Sciript like this used in SHunterTimers ( http://dl.qj.net/pc-gaming/mmorpg/wo...rs-110-en.html ) . I just need working algorithm for hooking spell cast by SPELLCASTSTOP/SPELLCASTSTART .Hope somebody can help me.

    Best regards. Sulf.

    Greetings everyone.

    I'm working at creating SnD timer AddOn , I used SPELLCAST_STOP event for tracking SnD "cast". Every time I use any spell I got an UI error "string not found"

    Should I use SPELLCASTSTART and SPELLCASTSTOP both?

    Or there is any mistake in this code?

        if (event == "SPELLCAST_STOP") then 
        if (string.find ("Slice and Dice")) then 
            Event() 
        end   
     ``
    

    Sciript like this used in SHunterTimers ( http://dl.qj.net/pc-gaming/mmorpg/wo...rs-110-en.html ) . I just need working algorithm for hooking spell cast by SPELLCASTSTOP/SPELLCASTSTART .Hope somebody can help me.

    Yes, you call string.find("Slice and Dice"), but the string.find function takes two arguments, as indicated in the documentation. Also, please do NOT paraphrase errors that you get, it makes it impossible to debug the problem. The error message you get from lua is always correct, and having that precise error message makes an enormous difference in figuring out the problem.

    Yes, you call string.find("Slice and Dice"), but the string.find function takes two arguments, as indicated in the [documentation][1]. Also, please do NOT paraphrase errors that you get, it makes it impossible to debug the problem. The error message you get from lua is always correct, and having that precise error message makes an enormous difference in figuring out the problem.

    [1]: http://wowprogramming.com/docs/api/strfind

    But how can I get second argument? I never worked with SPELLCAST_STOP. Already tried "msg", "text" etc...

    First, it's the FIRST argument you need, not the second.

    The message is sent with SPELLCAST_STOP. Figure out which one it is, and use it. You can't just pick arbitrary names.

    The chapter of the book dealing with the combat log should make this easy to understand.

    Maybe I'm blind, but I didn't found anything... :-(

    So, I decided to move in other way:

    ``

    if (event == "SPELLCAST_STOP") then
        if (arg2 == ("Slice and Dice")) then
            Event()
         end
    

    But its still not working :-( Also tried to replace "slice and dice" by its ID:

    ``

    if (event == "SPELLCAST_STOP") then
        if (arg2 == ("6774")) then
            Event()
         end
    

    :-(

    1. There is no SPELLCAST_STOP event. Nor is there a SPELL_CAST_STOP sub-event for the combat log system.
    2. You are severely misunderstanding the way these events work.
    3. Chapter 21 has an example addon that shows the use of the combat log and threat systems, I suggest you work yourself through it.

    Failing that, you'll need to tell me what you're trying to actually accomplish, because the code you are posting is full of events and variables that just don't exist.

    I just want to track cast of instant spells like Renew, Hunters mark, Slice and Dice and start some events (bars, warning, timers etc) Found this method in this hunter's timer addon LINK Its used SPELLCAST_STOP event .And tried to repeat thats method in my addon.

    That event hasn't existed for quite some time. There is a UNIT_SPELLCAST_STOP event which gives them for other units as well as yours. Perhaps you can use that.

    If you haven't purchased the book, unfortunately I do not have time to help you. Please feel free to contact any of the other World of Warcraft UI forums or IRC channels for assistance.