• including a lua file that's not in the same folder
    3 replies, posted
i do not know how to include my config https://i.imgur.com/KGJLWaF.png The config is ----------------------------------------------------- -- POLICE JAIL FOOD -- JailConfig = {} JailConfig.MainText = "Police Jail Food" -- Main text on the stove! The text in front of the stove! JailFoodAmounts = {} JailFoodAmounts.Noodles = 35 -- How much hunger do noodles give you? FoodList = { -- ["NAME IN THE MENU"] = {class = "weapon_m42" -- CLASS NAME INSIDE Q MENU, model = "model" --  the model}, ["Noodles"] = {class = "weapon_m42", model = "models/weapons/w_rif_m4a1.mdl"}, }
you can use the include function. include("entities/config.lua") I believe
Imagine anything past the lua folder as if it was merged together before being executed, as it was. Also, since you're not using a unique folder for your included files, you need to make the file name unique, otherwise it could overwrite another as Gmod actually merged all of them.
so make it pessentials_config and it wont merge then
Sorry, you need to Log In to post a reply to this thread.