1. Hi, i'm new in lua scripting and, of course, in wow addon programming.

    I'm trying to fix an addon that doesnt work properly in 3.0 of wow (it bugs the wow chat, and can't seen it). The only error is with that .. function? it says that arguments are wrong. I can paste the piece of code: 

    function FHSPoker_registerEvents()

       

        this:RegisterEvent("VARIABLES_LOADED");

        this:RegisterEvent("PLAYER_ENTERING_WORLD");

       

        --Initialize Commands

        SLASH_FHSPOKER1 = "/holdem";

       



        SlashCmdList["FHSPOKER"] = function(msg)

            SeatSlashCommand(msg);

        end





        --Hook the chatwindow, save the inherited hook

        if (ChatFrame_OnEvent ~= FHS_ChatFrameHook) then

            -- get chatframe events to allow us to hide chat

            FHS_OrginalChatHook = ChatFrame_OnEvent;

            ChatFrame_OnEvent = FHS_ChatFrameHook;

        end



    end

    Instead of my low experience in this, i could understand that chatFrame_onEvent is a handler of whatever it happens in the wow chat, and this code only switchs between a selfprogrammed handler and the original one.

    I was looking all aroung about this "function", and trying to see how does it work, but it's still imposible to find something interesting.

    If anyone could help me, it will be fantastic, and all we could play poker inside wow hehe.

    Thx all for reading me, and apologies for my poor english.

    NOTE: addon name: WowTexasHoldem by http://www.freeholdemstrategy.com

  2. Hi, i'm new in lua scripting and, of course, in wow addon programming.

    I'm trying to fix an addon that doesnt work properly in 3.0 of wow (it bugs the wow chat, and can't seen it). The only error is with that .. function? it says that arguments are wrong. I can paste the piece of code: 

    function FHSPoker_registerEvents()

       

        this:RegisterEvent("VARIABLES_LOADED");

        this:RegisterEvent("PLAYER_ENTERING_WORLD");

       

        --Initialize Commands

        SLASH_FHSPOKER1 = "/holdem";

       



        SlashCmdList["FHSPOKER"] = function(msg)

            SeatSlashCommand(msg);

        end





        --Hook the chatwindow, save the inherited hook

        if (ChatFrame_OnEvent ~= FHS_ChatFrameHook) then

            -- get chatframe events to allow us to hide chat

            FHS_OrginalChatHook = ChatFrame_OnEvent;

            ChatFrame_OnEvent = FHS_ChatFrameHook;

        end



    end

    Instead of my low experience in this, i could understand that chatFrame_onEvent is a handler of whatever it happens in the wow chat, and this code only switchs between a selfprogrammed handler and the original one.

    I was looking all aroung about this "function", and trying to see how does it work, but it's still imposible to find something interesting.

    If anyone could help me, it will be fantastic, and all we could play poker inside wow hehe.

    Thx all for reading me, and apologies for my poor english.

    NOTE: addon name: WowTexasHoldem by http://www.freeholdemstrategy.com

  3. Hi, i'm new in lua scripting and, of course, in wow addon programming.

    I'm trying to fix an addon that doesnt work properly in 3.0 of wow (it bugs the wow chat, and can't seen it). The only error is with that .. function? it says that arguments are wrong. I can paste the piece of code: 

    It makes it difficult without the context in which this function is called, but I suspect somewhere in your XML you are calling this function.  You should change the call from FHSPoker_registerEvents() to FHSPoker_registerEvents(...).  This ensures the script handler passes all of its arguments to this function.

    function FHSPoker_registerEvents()

       

        this:RegisterEvent("VARIABLES_LOADED");

        this:RegisterEvent("PLAYER_ENTERING_WORLD");

    These first line here should be changed to read function FHSPoker_registerEvents(self).  Blizzard will pass you the frame object, and we'll name it "self" here.  We could just name it "this" and avoid having to change anything else.. but that's bad practice for a number of reasons.

    Because we changed it from "this" to "self", we should change these to self:RegisterEvent("BLAHBLAH").

        --Initialize Commands

        SLASH_FHSPOKER1 = "/holdem";

       



        SlashCmdList["FHSPOKER"] = function(msg)

            SeatSlashCommand(msg);

        end





        --Hook the chatwindow, save the inherited hook

        if (ChatFrame_OnEvent ~= FHS_ChatFrameHook) then

            -- get chatframe events to allow us to hide chat

            FHS_OrginalChatHook = ChatFrame_OnEvent;

            ChatFrame_OnEvent = FHS_ChatFrameHook;

        end



    end

     

    Instead of my low experience in this, i could understand that chatFrame_onEvent is a handler of whatever it happens in the wow chat, and this code only switchs between a selfprogrammed handler and the original one.

    I was looking all aroung about this "function", and trying to see how does it work, but it's still imposible to find something interesting.

    If anyone could help me, it will be fantastic, and all we could play poker inside wow hehe.

    Thx all for reading me, and apologies for my poor english.

    NOTE: addon name: WowTexasHoldem by http://www.freeholdemstrategy.com

    Without a proper error message its hard to give you much more information.  The changes above may or may not apply, but I don't have a ton of time to dig into an old addon that has so many obvious coding errors to try and resurrect it.  Can you post more specific information about what problems you are having?

  4. First of all, thx for your answer.

    I have been analyzing the code and more errors, and with my low experience it's imposible to fix it right now.

    Thx, and I will tell you if I reach to something interesting with this.

    Cya