General > Developers Corner
Executing ULX commands on server startup
(1/1)
Splitzle:
How would I go about doing this? If I put "+ulx command" in the server batch file, it will not recognize it as a command since it is executed before ulx/ulib are able to load. I read that I could put a lua file in the lua/autorun/server directory and I tried my best to make one, but I am not very good at lua to begin with.
--- Code: ---local function RandomMap ( changeTo, ply ) --No idea if these are correct or needed
RunConsoleCommand("ulx", "randommap")
end
--- End code ---
I'm trying to do the "ulx randommap" command on startup. No errors were shown in console when I started it, so now I need help. Here is the RandomMap module if that helps.
An Error Has Occurred!
array_keys(): Argument #1 ($array) must be of type array, null given
[0] Board index
Go to full version