Issue with DFrame throwing an error.

Are the derma/VGUI features in GMod just completely broken now?

I was working on a mockup for a menu and started with this:
[lua]
function OpeningScreen()
local TopFrame = vgui.Register( “DFrame” )
TopFrame:SetTitle( “” )
TopFrame:SetVisible( true )
TopFrame:SetDraggable( false )
TopFrame:ShowCloseButton( false )
TopFrame.Paint = function()
surface.SetDrawColor( 0, 0, 0, 198 )
surface.DrawRect( 0, 0, ScrH() - 500, ScrW() )
end
TopFrame:MakePopup()
end
concommand.Add( “jockdev”, OpeningScreen )
[/lua]

but for some reason it keeps throwing this error at me:
[ERROR] lua/includes/extensions/client/panel/scriptedpanels.lua:194: attempt to index local ‘mtable’ (a nil value)

  1. Register - lua/includes/extensions/client/panel/scriptedpanels.lua:194
  2. unknown - lua/autorun/client/cl_openingscreen.lua:2
    3. unknown - lua/includes/modules/concommand.lua:69

I have no idea what’s causing this. I don’t see anything wrong with my code.

Don’t you want vgui.Create instead?

Oh god you’re right. Thanks, not sure how I missed that.