For an addon I'm currently making, I'm using:
include( "rules_settings.lua" )
to include the settings, and in the settings file I have:
local SERVERNAME = GetHostName()
local GAMEMODE = gmod.GetGamemode()
Rule1 = "Rule 1"
Rule2 = "Rule 2"
Rule3 = "Rule 3"
Rule4 = "Rule 4"
Rule5 = "Rule 5"
Rule6 = "Rule 6"
Rule7 = "Rule 7"
Rule8 = "Rule 8"
Rule9 = "Rule 9"
Rule10 = "Rule 10"I get this error when trying to use it:
[ERROR] lua/autorun/rules.lua:16: attempt to concatenate global 'SERVERNAME' (a nil value)
I don't necessarily need to use "include" but it makes it easier for others to edit.
And yes it has the right directory.