I have an addon for ULX I've been working that uses ULX functionality and is currently stored in /garrysmod/addons/ulx/lua/ulx/modules/sh/
I'd like to move it to: /garrysmod/addons/myaddonname/lua/autorun/mymodule.lua
I thought I did everything correctly but I'm getting:
[ERROR] addons/ambrosutilitymod/lua/autorun/ambro_util.lua:29: attempt to index global 'ulx' (a nil value)
1. unknown - addons/ambrosutilitymod/lua/autorun/ambro_util.lua:29
Relevant line, pseudo code:
local CATEGORY_NAME = "Utility"
function ulx.rules( calling_ply, target_plys, command )
do stuff here....
end
local rules = ulx.command( CATEGORY_NAME, "ulx rules", ulx.rules, "!rules" )
rules:addParam{ type=ULib.cmds.PlayersArg }
rules:defaultAccess( ULib.ACCESS_ADMIN )
rules:help( "Broadcasts the server rules to the target(s)." )
How do I make this standalone addon have the same visibility let's say, fun.lua or utility.lua has without having the file in that directory?
The reason I want to do this is so that in the event I update ULX, I won't have to keep messing with copying the file back over, etc.
Thank you for the help.