hey i was making my f4menu a bit cool and then I got this error and wanted to hear if somebody could help me: D
[ERROR] addons/f4_menu/lua/autorun/f4meny.lua:17: attempt to index global 'MEF4' (a nil value)
1. func - addons/f4_menu/lua/autorun/f4meny.lua:17
2. unknown - lua/includes/extensions/net.lua:32
if SERVER then
AddCSLuaFile( "vgui/menu_f4.lua" )
util.AddNetworkString( "f4menu" )
hook.Add( "ShowSpare2", "F4MmenuHook", function( ply )
net.Start( "f4menu" )
net.Send( ply )
end )
end
if CLIENT then
include( "vgui/menu_f4.lua" )
net.Receive( "f4menu", function()
if( !MEF4 ) then
MEF4 = vgui.Create( "menuf4" )
MEF4:SetVisible( false )
end
if( MEF4:IsVisible() ) then
MEF4:SetVisible( false )
gui.EnableScreenClicker( false )
else
MEF4:SetVisible( true )
gui.EnableScreenClicker( true )
end
end)
end
"menuf4" isn't a valid classname for a derma panel unless you've created it on your own hence it will be nil when MEF4:SetVisible( false ) is run.
thanks will try and give it a new name
That's not for naming it, you pick the derma element. It needs to be one of these VGUI Element List
okay but this show up
Couldn't include file 'vgui\menu_f4.lua' (File not found) (@addons/f4_menu/lua/autorun/f4meny.lua (line 12))
Sorry, you need to Log In to post a reply to this thread.