So I am getting a pesky error on the server about the surface library. I understand that the surface library doesn't exist on the server but I don't understand why it's being loaded on the server, I have an init file autorun/snpc_main.lua with this code [CODE]AddCSLuaFile('snpc_core/cl_main.lua')
AddCSLuaFile('snpc_core/cl_vgui.lua')
AddCSLuaFile('snpc_core/cl_fonts.lua')
if (SERVER) then
include('snpc_core/sv_main.lua')
end
if (CLIENT) then
include('snpc_core/cl_main.lua')
include('snpc_core/cl_vgui.lua')
include('snpc_core/cl_fonts.lua')
end[/CODE]
and the error is this:
[ERROR] addons/salary_npc/lua/snpc_core/cl_fonts.lua:24: attempt to index global 'surface' (a nil value)
1. createFont - addons/salary_npc/lua/snpc_core/cl_fonts.lua:24
2. unknown - addons/salary_npc/lua/snpc_core/cl_fonts.lua:42
3. include - [C]:-1
4. unknown - addons/salary_npc/lua/entities/snpc/cl_init.lua:4
5. include - [C]:-1
6. unknown - addons/salary_npc/lua/entities/snpc/init.lua:7
I'm including it in the client if statement so I have no clue why it's being read on the server...
You can put debug.Trace() at the top of that file and it should show you where it is being included from.
You are including cl_init.lua in your init.lua
Please, read the stack Trace
[QUOTE=gonzalolog;52269845]You are including cl_init.lua in your init.lua
Please, read the stack Trace[/QUOTE]
Ah yeah, that was issue.
Sorry, you need to Log In to post a reply to this thread.