Hi there, so i've been working on a small addon for gmod to make an effective buildmode script.
All has been going fine so far, and i wanted to add support for ulx loggs.
I've ran into a problem where i can't seem to get
ulx.logWriteln("Player:"..ply:Nick().."changed build mode")
to work, outside or inside of the modules folder.
For example. i have defined
function LogBuildMode(ply,bool)
inside of my "\addons\BuildMode\lua\ulx\modules\sh"
and it is being called in "\addons\BuildMode\BuildMode" with
LogBuildMode(ply,bool)
the build mode addon itself is loaded with an include file at "\addons\BuildMode\lua\autorun"
To my knowlege, lua defined functions should be able to be called from different scripts as long as they are not marked as local functions. Is this correct?
if i haven't messed up somewhere, the only thing i can think of is that it would be some kind of load order problem, in which the addon itself is read, but it can't find the function because ulx has not loaded.
I've also tried removing the need to comunicate functions across different scripts by simply adding
ulx.logWriteln("Player:"..ply:Nick().."changed build mode")
inside the addon itself outside of the "modules/sh" folder, but that didn't seem to work either.
Is this some kind of scope problem, or some kind of load order problem?
Thanks for any help.