init.lua
[CODE]AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
AddCSLuaFile("settings.lua")
include("shared.lua")
include("settings.lua")[/CODE]
cl_init.lua
[CODE]include("shared.lua")[/CODE]
I'm attempting to include the file "settings.lua". (this file is for easy customization/changes)
The console prints:
[CODE][AddCSLuaFile] Couldn't find 'settings.lua' <@addons/darkrpmodification-master/lua/entities/printer/init.lua <line 6>>[/CODE]
It says the same thing but with "couldn't include" in place of "couldn't find".
Am I missing how to include files properly? Been having issues with this for a while. Any insight would be appreciated!
--Anarchy
No he did it right the first time, it's something else. Could you please show use your entire file structure? Also do you plan on using "settings.lua" on the client side?
-snip-
Do you not get that its because the file isn't found in the directory? [u][b]His code is fine. The file just isn't where gmod is trying to find it[/b][/u]
-snip- dumb post
His code is indeed fine, this way works. But it's not recommended to add lua files to the client unless you're using them.
[editline]15th June 2014[/editline]
[B]Server[/B]
[U]init.lua[/U]
[CODE]AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
include("settings.lua")[/CODE]
[U]cl_init.lua[/U]
[CODE]
include("shared.lua")[/CODE]
[B]Shared[/B]
[U]init.lua[/U]
[CODE]AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
AddCSLuaFile("settings.lua")
include("shared.lua")
include("settings.lua")[/CODE]
[U]cl_init.lua[/U]
[CODE]
include("shared.lua")
include("settings.lua")[/CODE]
[QUOTE=RedXVIII;45108692]His code is indeed fine, this way works. But it's not recommended to add lua files to the client unless you're using them.
[editline]15th June 2014[/editline]
[B]Server[/B]
[U]init.lua[/U]
[CODE]AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
include("settings.lua")[/CODE]
[U]cl_init.lua[/U]
[CODE]
include("shared.lua")[/CODE]
[B]Shared[/B]
[U]init.lua[/U]
[CODE]AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
AddCSLuaFile("settings.lua")
include("shared.lua")
include("settings.lua")[/CODE]
[U]cl_init.lua[/U]
[CODE]
include("shared.lua")
include("settings.lua")[/CODE][/QUOTE]That's the exact same as I posted before, yet you disagreed with it? ZombieWizzard is right anyways, the file probably doesn't even exist there.
ZombieWizzard is correct. It is almost the same, but it's 100% correct.
there's no code in settings.lua
Thank you all for the replies. I have not put any code on settings.lua. The settings.lua file is in the same directory as the init, cl_init and shared.
[QUOTE=rejax;45109272]there's no code in settings.lua[/QUOTE]
you need to put something in settings.lua
Okay I'll try tomorrow
Empty files will have that effect, simply add // to the top line and it'll fix it.
Sorry, you need to Log In to post a reply to this thread.