Had a big long post written out and it decided it wasn't going to post but heres the error:
[CODE]
[ERROR] addons/sleekskin/lua/cl_init.lua:2246: attempt to perform arithmetic on global 'PanelNum' (a nil value)
1. Function - addons/sleekskin/lua/cl_init.lua:2246
2. unknown - lua/includes/modules/usermessage.lua:87
[/CODE]
And this is the cl_init.lua:
[CODE]
local panel = vgui.Create("DFrame")
panel:SetPos(3 + PanelNum, chatY - 145)
panel:SetTitle("Vote")
panel:SetPos( 50,50 )
panel:SetSize(140, 140)
panel:SetSizable(false)
panel.btnClose:SetVisible(false)
panel:SetDraggable(false)
[/CODE]
And this is the usermessage.lua file:
[CODE]--[[---------------------------------------------------------
Name: Call( name, args )
Desc: Called by the engine to call a gamemode hook
-----------------------------------------------------------]]
function IncomingMessage( MessageName, msg )
if ( Hooks[ MessageName ] ) then
Hooks[ MessageName ].Function( msg, unpack(Hooks[ MessageName ].PreArgs) )
return
end
Msg("Warning: Unhandled usermessage '"..MessageName.."'\n")
end
[/CODE]
Thanks for any help you can give!
The error means that PanelNum is not set.. You must set it to some number somewhere in the script before using math functions on it.
Where are you defining PanelNum?
Sorry, you need to Log In to post a reply to this thread.