• 0

    posted a message on Need Help with GildenSteuer
    Hey, I need your help. 
    My addon GildenSteuer sometimes shows the error after porting from a dungeon or using a portal:
    1x GildenSteuer\GildenSteuer-3.4.lua:377: attempt to concatenate local 'playerName' (a nil value)

    Here is the Lines:
    function GildenSteuer:RequestStatus(playerName, timestamp)
    	self:Debug("Add status request for " .. playerName .. " to queue")
    	if timestamp == nil then
    		timestamp = self:GetPlayerStatusDB(playerName, true).timestamp
    	end
    	local data = {"S", playerName}
    	if timestamp ~= nil then
    		table.insert(data, timestamp)
    	end
    	table.insert(self.outgoingQueue, data)
    end


    Here is the Addon for Retail:
    GildenSteuer - Addons - World of Warcraft - CurseForge

    I hope anyone can help me.

    Posted in: AddOn HELP!
  • 0

    posted a message on New Portable Button Problems
    I solved the problem, a space was missing in the German translation. Thank you all for the help.
    Posted in: AddOn HELP!
  • 0

    posted a message on New Portable Button Problems

    Hello folks,
    I have a small problem that I just can't get any further. Since the Dragonflight update, I can no longer press any buttons in my addon. I've tried pretty much everything I knew, but I just can't do it.
    Perhaps one of you can help me to solve the problem. I would be very very grateful.

    Thats the Addon: New Portable

    I think the problem is somewhere in this area in main.lua

     

    -- Create the Clickable Portable Buttons
    function me:CreateUI_Buttons()
        local n
        -- Create each button using a Secure Action template
        for n = 1, me.MAX_BUTTONS do
            local button = "button"..tostring(n)
            
            -- Each "button" is really a Frame with a Button, Texture, and Text
            me.ui[button] = CreateFrame("Frame", "PortableUIButton"..tostring(n), me.ui.container)
            me.ui[button].ID = n
            me.ui[button]:SetScript("OnEnter", function(self, ...)
                    me:DoScript_OnEnter(self, ...)
                end)
            me.ui[button]:SetScript("OnLeave", function(self, ...)
                    me:DoScript_OnLeave(self, ...)
                end)
            
            -- The Secure Action Button
            me.ui[button].sab = CreateFrame("Button", "PortableUIButton"..tostring(n).."SAB", me.ui[button], "SecureActionButtonTemplate")
            me.ui[button].sab:RegisterForClicks("LeftButtonDown", "RightButtonDown")
            me.ui[button].sab:SetScript("OnEnter", function(self, ...)
                    me:DoScript_OnEnter(self, ...)
                end)
            me.ui[button].sab:SetScript("OnLeave", function(self, ...)
                    me:DoScript_OnLeave(self, ...)
                end)
            me.ui[button].sab:HookScript("OnClick", function(self, ...)
                    me:DoScript_OnClick(self, ...)
                end)
            me.ui[button].sab:SetAllPoints(me.ui[button])
            
            -- Disabled Texture (If a mage doesn't know a spell, it will be greyed out)
            me.ui[button].disabled = me.ui[button]:CreateTexture(nil, "ARTWORK")
            me.ui[button].disabled:SetAllPoints(me.ui[button])
            
            -- Text (Shows the name of the destination)
            me.ui[button].text = CreateFrame("Frame", nil, me.ui[button])
            me.ui[button].text:SetAllPoints(me.ui[button])
            me.ui[button].text.name = me.ui[button].text:CreateFontString(nil)
            me.ui[button].text.name:SetFont("Fonts\\ARHei.ttf", 12, "") -- Default font, we don't want a nil font
            me.ui[button].text.name:SetJustifyV("TOP")
        end
    end

     

    Posted in: AddOn HELP!
  • 0

    posted a message on Please Help Button for /command`s

    In reply to Ketho17:

     

    The Commands are:

    /roll
    /readycheck
    /pull 6

    Posted in: Lua Code Discussion
  • 0

    posted a message on Please Help Button for /command`s

    In reply to Seerah1:

    Exactly, that's what I mean.

    I have only the problem that I am still a beginner in the matter lua.

    For starters, I find my lua not so bad, but I just can not get on there.
    It would be nice if someone could help me there.

    Posted in: Lua Code Discussion
  • 0

    posted a message on Please Help Button for /command`s

    In reply to Ketho17:

     Iam new on this so i will make a video to show you my Problem Tomorrow.

    Posted in: Lua Code Discussion
  • 0

    posted a message on Please Help Button for /command`s

    Hi,

    i have a little Problem, i make a Button with a /command, like this

     

    QC.b=Add_Button(L["PullTimer"],"/pull 6",W,0,QC.F,{0.7,0.7,0.2,1});W=W+50;

     

    In the game now i press the button PullTimer.
    Now it is in chat /pull 6 and I would have to confirm with Enter. But I want if I click the button PullTimer the command /pull 6 is executed automatically.

     

    It would be very very friendly if someone could help me.

     

    Sorry for my Bad English.

     

    Thats my Lua:

     

    local frame = CreateFrame("Frame",nil,UIParent)
    local L=QCL[GetLocale()];
    if type(L)~="table" then L=QCL["enUS"]; end
    local QC={};
    local backdrop = {
        bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
        edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",   
        edgeSize = 16,
        insets = { left = 3, right = 3, top = 3, bottom = 3 }
    }
    
    function Open_chat(channel)
    	local editBox = ChatEdit_ChooseBoxForSend();
    	local txt = editBox:GetText();
    	local chatFrame = editBox.chatFrame;
    	ChatFrame_OpenChat(channel..txt, chatFrame); 
    	ChatEdit_UpdateHeader(editBox);
    end
    function Add_Frame(w,h)
    	local CF = CreateFrame("FRAME","addcomentframe_frame",UIParent);
    	CF:SetMovable(true)
    	CF:EnableMouse(true)
    	CF:SetClampedToScreen(true)
    	CF:SetScript("OnMouseDown", CF.StartMoving) 
    	CF:SetScript("OnMouseUp",function(self, event, ...)
    			self:StopMovingOrSizing();
    			local point, relativeTo, relativePoint, xOfs, yOfs = self:GetPoint(n);
    			QC_Point={pnt=point,x=xOfs,y=yOfs};
    	end)
    	local pad = QC_Point.pnt or "BOTTOMLEFT";
    	CF:SetWidth(w);   
    	CF:SetHeight(h);
    	CF:SetPoint(pad,QC_Point.x,QC_Point.y );
    	CF:SetBackdrop(backdrop);
    	CF:SetBackdropColor(0.2,0.2,0.2,1);
    	CF:SetBackdropBorderColor(0.2,0.1,0.1,1);
    	CF:Hide()
    	return CF;
    end
    function Add_Button(text,command,x,y,parent,color) 
    	local Button = CreateFrame("Button", nil, parent) 
    	Button:SetWidth(80)
    	Button:SetHeight(20)
    	Button:SetPoint("CENTER",parent, "LEFT", x, y);
    	Button:SetNormalFontObject("GameFontHighlight");
    	Button:SetText(text)
    	Button:RegisterForClicks("AnyUp") 
    	local textureFrame4 = Button:CreateTexture("ARTWORK")
    	textureFrame4:SetColorTexture(color[1],color[2],color[3],color[4])
    	textureFrame4:SetAllPoints(Button)
    	Button:SetScript("OnClick", function() 
    		Open_chat(command);
    	end )
    	return Button;
    end
    function Add_Button_NOc(text,x,y,parent,color) 
    	local Button = CreateFrame("Button", nil, parent)
    	Button:SetWidth(80)
    	Button:SetHeight(20)
    	Button:SetPoint("CENTER",parent, "LEFT", x, y);
    	Button:SetNormalFontObject("GameFontHighlight");
    	Button:SetText(text)
    	Button:RegisterForClicks("AnyUp") 
    	local textureFrame4 = Button:CreateTexture("ARTWORK")
    	textureFrame4:SetColorTexture(color[1],color[2],color[3],color[4])
    	textureFrame4:SetAllPoints(Button)
    	return Button;
    end
    
    --background
    function update_frame_btn()
    	if type(QC)=="table" and QC.F~=nil then QC.F:Hide(); QC={}; end
    	inInstance, instanceType = IsInInstance();
    	QC.F = Add_Frame(10,30); local W=50;
    	if type(QC_Settings)=="table" then
    		if QC_Settings.bt~=1 then for key, val in pairs(L) do L[key]=""; end end
    	end
    --background
    	QC.b=Add_Button(L["S"],"/s ",W,0,QC.F,{0.5,0.5,0.5,1});W=W+81;
    	if IsInGuild() then QC.b7=Add_Button(L["G"],"/g ",W,0,QC.F,{0.3,0.6,0.4,1});W=W+81; end
    	QC.b=Add_Button(L["P"],"/p ",W,0,QC.F,{0.2,0.3,0.4,1});W=W+81;
    	QC.b=Add_Button(L["R"],"/raid  ",W,0,QC.F,{0.5,0.0,0.4,1});W=W+81;
    	QC.b=Add_Button(L["I"],"/i ",W,0,QC.F,{0.9,0.5,0.3,1});W=W+81;
    	QC.b=Add_Button(L["RO"],"/roll",W,0,QC.F,{0.7,0.4,0,1});W=W+81;
    	QC.b=Add_Button(L["RC"],"/readycheck",W,0,QC.F,{0.1,0.2,0,1});W=W+81;
    	QC.b=Add_Button(L["PULL"],"/pull 6",W,0,QC.F,{0.7,0.7,0.2,1});W=W+50;
    	
    	QC.F:SetWidth(W);
    	QC.F:Show();
    	 
    end
    
    function frame:ADDON_LOADED(arg1)  
    	if (arg1 == "QC_Settings" and type(QC_Settings)~="table") or not QC_Settings then QC_Settings={bt=1}; end
    
    	if (arg1 == "QC_Point" and type(QC_Point)~="table") or not QC_Point then QC_Point={x=(GetScreenWidth()*0.5),y=(GetScreenHeight()*0.5)}; end
    	if type(QC_Point)=="table" and QC.F==nil then update_frame_btn(); end 
    end
    
    function frame:GROUP_ROSTER_UPDATE(arg1)	
    	if type(QC_Point)=="table" and QC.F~=nil then update_frame_btn(); end
    end
    function frame:CONSOLE_MESSAGE(arg1)
    	if type(QC_Point)=="table" and QC.F~=nil then update_frame_btn(); end 
    end
    function frame:PLAYER_STOPPED_MOVING(arg1)
    	if type(QC_Point)=="table" and QC.F~=nil then update_frame_btn(); end
    end
    function frame:PLAYER_STARTED_MOVING(arg1)
    	if type(QC_Point)=="table" and QC.F~=nil then update_frame_btn(); end
    end
    function frame:CRITERIA_UPDATE(arg1)
    	if type(QC_Point)=="table" and QC.F~=nil then update_frame_btn(); end
    end
    
    frame:RegisterEvent("CONSOLE_MESSAGE");
    frame:RegisterEvent("ADDON_LOADED");
    frame:RegisterEvent("GROUP_ROSTER_UPDATE");
    frame:RegisterEvent("PLAYER_STOPPED_MOVING");
    frame:RegisterEvent("PLAYER_STARTED_MOVING");
    frame:RegisterEvent("CRITERIA_UPDATE");
    frame:SetScript("OnEvent",function(self, event, ...) self[event](self, ...) end)

     

     

     

    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.