1. I'm attempting to write my first addon while trying to learn LUA. I'm having trouble finding the exact API data to move forward with my code. I'd like to write it myself, but I'm wondering if someone can point me in the right direction with some better examples. Currently I'm trying to make a very simple code that when you enter a LFG, it compares your active spec(tank, healer, damage) to your Queued selected role(tank, healer, damage), and if they don't match, prints a message in chat saying you are in the wrong spec. Some of the "get(functions)" I've been looking at in the WoW API are incomplete for data and explanations. Any pointers?

    Here's my current code:(which I'm sorry if it's noobish I'm more use to Python)

     -- Spec Check load on Instance
     local f = CreateFrame("Frame")
     local role = UnitGroupRolesAssigned("player")
     local isAssigned = GetPartyAssignment("assignment", "player")
    
     f:RegisterEvent(PLAYER_ROLES_ASSIGNED);
     --f:RegisterEvent(ending event);
    
     -- Check Active Role Vs. Assigned Role
     f:SetScript("OnEvent", function(self, event, ...)
        if event == "PLAYER_ROLES_ASSIGNED" and role ~= isassigned then
            print("Your current Talent Spec is set Wrong, switch specs!")
        end
    
     end)
    

    Thank you for any tips, I'm just doing this for fun.

  2. Does your code work? Something specific I can help with?