Need help fixing Zombie Survival

So basicly i am making a zs server and whenever you try to open the zombie class switch menu you get this error:

:1: attempt to call global ‘MakepClasses’ (a nil value)

so i’ve traced back the error to the function “MakepClasses” in the “pclasses.lua” file, the code for this is


local function SwitchClass(btn)
	RunConsoleCommand("zs_class", btn.Class.Name)
	surface.PlaySound("buttons/button15.wav")
	pClasses:SetVisible(false)
end

function MakepClasses()
	if pClasses then
		pClasses:Remove()
		pClasses = nil
	end

 

then later in the code at the last line:



	local Window = vgui.Create("DFrame")
	Window:SetPos(w * 0.25, h * 0.025)
	Window:SetSize(w * 0.5, h * 0.95)
	Window:SetTitle(" ")
	Window:SetVisible(true)
	Window:SetDraggable(false)
	Window:MakePopup()
	Window:SetDeleteOnClose(false)
	Window:SetKeyboardInputEnabled(false)
	Window:SetCursor("pointer")
	pClasses = Window


I am using the public zs server “Zombie Survival v2.01”
which i think is the latest.

Any help would be appreciated.

-snip-

Hang on let me reread that.

I don’t think you have the right code snippets, it’s not even calling MakepClasses there as a global? It only defines it as a function?