[url]http://wiki.garrysmod.com/page/Structures/TOOL[/url]
This page is missing an entry for "Mode", which is similar to "ClassName" in the [url=http://wiki.garrysmod.com/page/Structures/SWEP]SWEP Structure[/url].
TOOL.Mode references the name of the tools .lua file as seen here: [url=https://github.com/Facepunch/garrysmod/blob/master/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stool.lua#L136]gmod_tool/stool.lua:136[/url]
Furthermore there seems to be no information about TOOL.LastMessage ([url=https://github.com/Facepunch/garrysmod/blob/master/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stool.lua#L26]gmod_tool/stool.lua:26[/url]) which appears to flash white when it is set to CurTime() ([url=https://github.com/Facepunch/garrysmod/blob/master/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/cl_init.lua#L91]gmod_tool/cl_init.lua:91[/url])
And last but not least, the variable TOOL.Message ([url=https://github.com/Facepunch/garrysmod/blob/master/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stool.lua#L25]gmod_tool/stool.lua:25[/url]) doesn't seem to be used at all.
Anywhere.
Why? what's it supposed to be for?
Oh and, it should definitely be written somewhere that you set the description of the tool with language.Add( "#tool.<lua_name>.desc", "text here" )
Thanks guys~
[URL="http://wiki.garrysmod.com/index.php?title=Structures/TOOL&action=formedit"]T[/URL][URL="http://wiki.garrysmod.com/index.php?title=Structures/TOOL&action=formedit"]hen change the page?[/URL]
alright, i've created an account and will make the changes momentarily.
I was also looking at adding a list of enumerations for FindMetaTable.
In particular i'm looking to access the "ToolObj" metatable but it doesn't seem to be in the registry.
In [URL="https://github.com/Facepunch/garrysmod/blob/master/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stool.lua#L25"]stool.lua[/URL] the table is defined as a global, yet i can't seem to access it.
Any ideas why?
-- edit --
it gets set to nil later on in the file >_< ([URL="https://github.com/Facepunch/garrysmod/blob/master/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stool.lua#L149"]stool.lua:149[/URL])
Still, i would like to be able to access it.
Suggestions?
Sorry, you need to Log In to post a reply to this thread.