Description
Sets the userdata for the given index.
Arguments
1number indexthe index to set the userdata on
2string valuethe userdata to set
3number length = nilthe length that should be used. Only use this if you know what your doing!
Example
Messing with gmod's datapack paths
local dataTablePaths = {
"/lua/",
"/addons/exampleaddon/lua/",
"/workshop/lua/",
"/workshop/gamemode/",
"/gamemode/",
"/workshop/gamemodes/base/entities/",
"/gamemodes/base/entities/",
"/workshop/gamemodes/sandbox/entities/",
"/gamemodes/sandbox/entities/",
}
local client_lua_files =
stringtable.
FindTable(
"client_lua_files")
client_lua_files:SetStringUserData(0, table.concat(dataTablePaths,
";")) -- NOTE: Changes to the datatable path will only affect the lcl search path clientside.