General > Developers Corner
Noob Lua Question
(1/1)
Doomed:
So I'm quiet new with lua, but there's 1 thing i'm currently having problems with: I can't get the spawn menu to be enabled. I've derived it from sandbox, so there's no problem there. I also added this to init.lua:(might be wrong though)
--- Code: ---function GM:SpawnMenuEnabled()
return true;
end
--- End code ---
Any ideas?
JamminR:
http://wiki.garrysmod.com/page/SANDBOX/SpawnMenuEnabled
Tried SANDBOX:SpawnMenuEnabled ?
(MrPresident is probably one of our most experienced gamemode coders here...I'm sure he'll have more questions to assist you if my suggestion isn't correct.
I've no idea if GM in a Sandbox derived gamemode actually becomes 'sandbox')
An Error Has Occurred!
array_keys(): Argument #1 ($array) must be of type array, null given
[0] Board index
Go to full version