I’m currently working on a STOOL, but I’ve decided to seperate it into seperate Lua scripts as they were getting quite lengthy. But, whenever I try to include a file in my STOOL’s Lua, it claims it can’t find the file. However, I was under the assumption that includes can either be relative to the file or to the Lua directory. When I try to run it with lua_openscript, it can find it perfectly fine, and it outputs exactly what I’m expecting it to output, namely a string and a table address. The respective console outputs:
Couldn’t include file ‘derma.lua’ (File not found) (@addons/vem/lua/weapons/gmod_tool/stools/vem.lua (line 6))
Running script derma.lua…
My derma.lua is in the root Lua directory of my add-on, so I figured I would be able to include it with
But, to no avail. I quintuple-checked it by skimming through other people’s code. What’s going on here?