So ive decided to TRY and teach myself Lua with the help of Garrysmod Wiki...
My first little project so to speak is to make a form of MOTD with tabs and im posting here because of well i hate facepunch, its full of people with non-helpful comments but yea ive started making this motd and got a error already lol... its:
[lua\autorun\motd.lua:3] attempt to index global 'vgui' (a nil value)
and the code im using is:
function testpanel()
local DermaMOTD = vgui.Create("Frame")
DermaMOTD:SetTitle( "Welcome to blah blah blah" )
DermaMOTD:SetPos( 50,50 )
DermaMOTD:SetSize( 500, 500 )
DermaMOTD:SetVisible( true )
DermaMOTD:SetBackgroundBlur( true )
DermaMOTD:SetDraggable( true )
DermaMOTD:ShowCloseButton( true )
DermaMOTD:MakePopup()
end
concommand.Add("testmenu", testpanel)
now i dont see how this can be making a error as it is just from the garrysmod wiki but can anyone help please???
Edit:I have changed the way the function works and it seems to have fixed it, just shows how Wiki have to much wrong information