• Problem with making VGUIs
    2 replies, posted
So im trying to make VGUI with buttons and everything for my weapon. This is the code: function SWEP:Reload() local form = vgui.Create("DFrame") form:SetTitle("Test") form:SetPos(5,5) form:SetSize(10,10) form:MakePopup() end this is the error: [ERROR] addons/omg_weapons/lua/weapons/main_admin/shared.lua:115: attempt to index global 'vgui' (a nil value) 1. unknown - addons/omg_weapons/lua/weapons/main_admin/shared.lua:115 thanks to who ever will help :)
You're trying to call it serverside. Put this on it. if CLIENT then --code end
ok thanks
Sorry, you need to Log In to post a reply to this thread.