Need a fix for the Code

Getting these errors
[ERROR] lua/derma/derma_gwen.lua:39: attempt to perform arithmetic on local ‘w’ (a nil value)

  1. Button - lua/derma/derma_gwen.lua:39
  2. SkinHook - lua/skins/default.lua:386
    3. OPaint - lua/vgui/dbutton.lua:85
    4. unknown - lua/autorun/client/motd.lua:32

[lua]local MenuFrame = vgui.Create(“DFrame”)
MenuFrame.OPaint = MenuFrame.Paint
MenuFrame:SetSize(ScrW() * 0.95, ScrH() * 0.95)
MenuFrame:SetPos((ScrW() - MenuFrame:GetWide()) / 2, (ScrH() - MenuFrame:GetTall()) / 2)
MenuFrame:SetTitle("Welcome to " … GetHostName())
MenuFrame:SetVisible(true)
MenuFrame:SetDraggable(true)
MenuFrame:ShowCloseButton(true)
MenuFrame.Paint = function()
MenuFrame.OPaint(MenuFrame)
surface.SetDrawColor(Color(60, 60, 60, 255))
surface.DrawLine(1, MenuFrame:GetTall() - 27, MenuFrame:GetWide() - 1, MenuFrame:GetTall() - 27)
draw.RoundedBox( 6, 0, 1, MenuFrame:GetWide(), MenuFrame:GetTall() + 1, FrameColor )
end
MenuFrame:MakePopup()

local CloseButton = vgui.Create(“DButton”, MenuFrame)
CloseButton.OPaint = CloseButton.Paint
CloseButton:SetSize(150, 35)
CloseButton:SetPos(MenuFrame:GetWide() * 0.75, MenuFrame:GetTall() - 27 - CloseButton:GetTall()/2)
CloseButton:SetText(“Ok, now let me play!”)
CloseButton.Paint = function()
CloseButton.OPaint(CloseButton)
surface.SetDrawColor(ButtonColor)
surface.DrawRect(1, 1, CloseButton:GetWide() - 2, CloseButton:GetTall() - 2)
end
CloseButton.DoClick = function(button)
MenuFrame:Close()
end

local MenuPSheet = vgui.Create(“DPropertySheet”, MenuFrame)
MenuPSheet:SetPos(13, 30)
MenuPSheet:SetSize(MenuFrame:GetWide() - 25, MenuFrame:GetTall() - 84)

local MOTD = vgui.Create( “HTML”, MenuFrame )
MOTD:SetPos( 25, 50 )
MOTD:SetSize( 250, 250 )
–MOTD:SetHTML([]) --use this for custom html code
MOTD:OpenURL(“nexttiergaming.org/motd.htm”) – nexttiergaming.org/

local Rules = vgui.Create( “HTML”, MenuFrame )
Rules:SetPos( 25, 50 )
Rules:SetSize( 250, 250 )
–Rules:SetHTML([]) --use this for custom html code
Rules:OpenURL(“http://gtxhosting.co.uk/markl/motd.html”) – or this if you want to open an URL, remember that you must pick only one

local AdminList = vgui.Create( “HTML”, MenuFrame )
AdminList:SetPos( 25, 50 )
AdminList:SetSize( 250, 250 )
–AdminList:SetHTML([]) --use this for custom html code
AdminList:OpenURL(“http://gtxhosting.co.uk/markl/motd.html”) – or this if you want to open an URL, remember that you must pick only one

local GroupPage = vgui.Create(“HTML”)
GroupPage:SetParent(MenuPSheet)
GroupPage:SetPos( 25, 50 )
GroupPage:SetSize( 250, 250 )
–GroupPage:SetHTML([]) --use this for custom html code
GroupPage:OpenURL(“http://steamcommunity.com/groups/MysteryTurtleGaming”) – or this if you want to open an URL, remember that you must pick only one

local Forums = vgui.Create( “HTML”, MenuFrame )
TabName:SetPos( 25, 50 )
TabName:SetSize( 250, 250 )
–TabName:SetHTML([]) --use this for custom html code
TabName:OpenURL(“http://mysteryturtlegaming.boards.net/index.cgi”) – or this if you want to open an URL, remember that you must pick only one

local Donations = vgui.Create( “HTML”, MenuFrame )
TabName:SetPos( 25, 50 )
TabName:SetSize( 250, 250 )
–TabName:SetHTML([]) --use this for custom html code
TabName:OpenURL(“http://mysteryturtlegaming.boards.net/index.cgi?board=serverandforumrules&action=display&thread=56”) – or this if you want to open an URL, remember that you must pick only one

–You can add your own tabs down here
/*EXAMPLE:
local TabName = vgui.Create( “HTML”, MenuFrame )
TabName:SetPos( 25, 50 )
TabName:SetSize( 250, 250 )
–TabName:SetHTML([]) --use this for custom html code
–TabName:OpenURL("") – or this if you want to open an URL, remember that you must pick only one
*/

–You can chane the popup order here, or add your own tab!

local order = {}
order[1] = {“Group Page”, GroupPage, “gui/silkicons/group”, false, false, “Group page here”}
order[2] = {“Rules”, Rules, “gui/silkicons/exclamation”, false, false, “Rules are listed here”}
order[3] = {“MOTD”, MOTD, “gui/silkicons/page”, false, false, “Message of the day”}
order[4] = {“Staff”, AdminList, “gui/silkicons/shield”, false, false, “Staff are listed here”}
–order[5] = {“A name”, TabName, “gui/silkicons/page”, false, false, “A description”}

for _, tab in pairs(order) do
MenuPSheet:AddSheet(unpack(tab))
end

end

concommand.Add(“showmotdmenu”, OpenMOTDMenu)[/lua]

The error doesn’t show where the problem is in that snippet - the last bit points to line 32 but that doesn’t look like it’d create that error.

Message me if you want to know how to fix this code. You can reach me on the forums of NextTierGaming.org, the website your taking the motd from. Did you get this from Zeph?