General > Developers Corner
creating ulx group thorugh lua
(1/1)
dankpepe:
I'm trying to make a lua autorun script that creates a group called usor and inherits from superadmin. I have this:
RunConsoleCommand( "ulx hide", "ulx addgroup", "usor superadmin" )
It creates the usor group just fine, but it doesn't inherit from superadmin.
Megiddo:
"usor" and "superadmin" are separate arguments, and would need to be separated in the function call.
But, you should really use the API -- http://ulyssesmod.net/docs/files/lua/ulib/server/ucl-lua.html#ucl.addGroup
dankpepe:
How would I use the API? I've tried to use it, but it wasn't working. I have tried:
ULib.ucl.addGroup( usor, _ , superadmin, _ )
An Error Has Occurred!
array_keys(): Argument #1 ($array) must be of type array, null given
[0] Board index
Go to full version