• Assmod problems
    12 replies, posted
I dont know if it's new but I never had these kind of problems with assmod here's the error: [lua][ass_client.lua:200] attempt to call method 'OpenSubMenu' (a nil value)[/lua] [lua]function ASS_FixMenu( MENU ) function DMenuOption_OnCursorEntered(self) local m = self.SubMenu if (self.BuildFunction) then m = DermaMenu( self ) ASS_FixMenu(m) m:SetVisible( false ) m:SetParent( self:GetParent() ) PCallError( self.BuildFunction, m) end self:GetParent():OpenSubMenu( self, m ) end function DMenuOption_SetImage(self, img) self.Image = ASS_Icon(img) end function DMenuOption_OnMouseReleased( self, mousecode ) DButton.OnMouseReleased( self, mousecode ) if ( self.m_MenuClicking ) then self.m_MenuClicking = false if (!self.ClickReturn) then CloseDermaMenus() end end end function DMenuOption_Paint(self) derma.SkinHook( "Paint", "MenuOption", self ) if (self.Image) then surface.SetTexture( self.Image ) surface.SetDrawColor( 255, 255, 255, 255 ) surface.DrawTexturedRect( 2, (self:GetTall() - 16) * 0.5, 16, 16) end return false end local function DMenu_AddOption( self, strText, funcFunction ) local pnl = vgui.Create( "DMenuOption", self ) pnl.OnCursorEntered = DMenuOption_OnCursorEntered pnl.OnMouseReleased = DMenuOption_OnMouseReleased pnl.Paint = DMenuOption_Paint pnl.SetImage = DMenuOption_SetImage pnl:SetText( strText ) if ( funcFunction ) then pnl.DoClick = function(self) self.ClickReturn = funcFunction(pnl) end end self:AddPanel( pnl ) return pnl end local function DMenu_AddSubMenu( self, strText, funcFunction, openFunction ) local SubMenu = nil if (!openFunction) then SubMenu = DermaMenu( self ) ASS_FixMenu(SubMenu) SubMenu:SetVisible( false ) SubMenu:SetParent( self ) end local pnl = vgui.Create( "DMenuOption", self ) pnl.OnCursorEntered = DMenuOption_OnCursorEntered pnl.OnMouseReleased = DMenuOption_OnMouseReleased pnl.Paint = DMenuOption_Paint pnl.SetImage = DMenuOption_SetImage pnl.BuildFunction = openFunction pnl:SetSubMenu( SubMenu ) pnl:SetText( strText ) if ( funcFunction ) then pnl.DoClick = function() pnl.ClickReturn = funcFunction(pnl) end else pnl.DoClick = function() pnl.ClickReturn = true end end self:AddPanel( pnl ) if (SubMenu) then return SubMenu, pnl else return pnl end end MENU.AddOption = DMenu_AddOption MENU.AddSubMenu = DMenu_AddSubMenu end[/lua] And the other error [lua][ass_client.lua:594] attempt to get length of field 'Panels' (a nil value)[/lua] [lua]function ASS_ShowMenu() local MENU = DermaMenu() ASS_FixMenu(MENU) if (!LocalPlayer():IsTempAdmin()) then ASS_RunPluginFunction("AddNonAdminMenu", nil, MENU ) if (#MENU.Panels == 0) then return end else local GamemodeImage = "gui/silkicons/sport_soccer" if (GAMEMODE.ASS_MenuIcon) then GamemodeImage = GAMEMODE.ASS_MenuIcon end MENU:AddSubMenu("Set Access", nil, function(NEWMENU) ASS_PlayerMenu(NEWMENU, { "HasSubMenu" }, ASS_AccessMenu ) end ):SetImage( "gui/silkicons/key" ) MENU:AddSubMenu("Kick", nil, function(NEWMENU) ASS_PlayerMenu(NEWMENU, { "HasSubMenu" }, ASS_KickReasonMenu ) end ):SetImage( "gui/silkicons/error" ) MENU:AddSubMenu("Ban", nil, function(NEWMENU) ASS_PlayerMenu(NEWMENU, { "HasSubMenu" }, ASS_BanTimeMenu ) end ):SetImage( "gui/silkicons/exclamation" ) MENU:AddSpacer() MENU:AddSubMenu("Rcon", nil, ASS_RconMenu):SetImage( "gui/silkicons/application_xp_terminal" ) MENU:AddSpacer() MENU:AddSubMenu("Plugins", nil, ASS_Plugins ):SetImage( "gui/silkicons/wrench" ) MENU:AddSubMenu( GAMEMODE.Name, nil, ASS_Gamemode ):SetImage(GamemodeImage) ASS_RunPluginFunction("AddMainMenu", nil, MENU ) end MENU:Open( 100, 100 ) ASS_MenuShowing = true timer.Simple( 0, gui.SetMousePos, 110, 110 ) ASS_Debug( "menu opened\n") end[/lua] Is there anything wrong? I cant seem to detect the problem. Please help me. Thank you very much.
Anyone?
Assmod has been broken, let it die.
The creator doesn't go glua anymore if I remember correctly. This won't be fixed.
Assmod isn't updated since 2007, you're on your own.
People it is not assmod which is broken. Garry broke everything involving panels, such as some things like darkrp and pcmod2.
Not to me, might be derma that is broken, but my panels are working fine.
So assmod is pretty much broken?
That is not the right way to bump. Yes it is broken. Thats why you made this thread.
Alright then I guess ill have to do another menu for assmod on my server...
Check my posts in: [url]http://www.facepunch.com/threads/1091514-PERP-ass_client.lua-problem[/url] I even posted a complete ass_client.lua fix.
[QUOTE=jimbodude;30997503]Check my posts in: [url]http://www.facepunch.com/threads/1091514-PERP-ass_client.lua-problem[/url] I even posted a complete ass_client.lua fix.[/QUOTE] Thank you very much ill try this as soon as I come back home!
Use ULX for a good admin mod. If you need toolgun/weapon restriction for darkrp FAdmin has one built in.
Sorry, you need to Log In to post a reply to this thread.