Skip to main content

ColorMeta Errors

[...Stack] attempt to index local 'colorMeta' (a nil value)

This error occurs when PulsarUI is trying to create its own colour modification functions, but it is unable to due to your server not having the necessary fixes for Metatables.

Fix

There are a few reasons why this error could be happening: Outdated server, Outdated /lua/includes/init.lua file, or another addon overwriting the /lua/includes/init.lua file.

Outdated Server

To fix this issue, you will need to update your server to the latest version of the Garry's Mod dedicated server. Usually, your server host will do this automatically or have a button to do this for you. If you are hosting the server yourself, you can figure that out yourself.

Outdated /lua/includes/init.lua file

To fix this issue, you will need to check your /lua/includes/init.lua file and make sure it contains the following code at the top of the file:

-- Temporary hack
local meta = {}
function meta.__index( self, key )
return FindMetaTable( key )
end

local metas = {}
function meta.__newindex( self, key, value )
rawset( self, key, value )

if ( isstring( key ) and istable( value ) ) then
metas[ key ] = value
end
end

local tbl = {}
setmetatable( tbl, meta )
debug.getregistry = function()
return tbl
end

local oldFindMetaTable = FindMetaTable
FindMetaTable = function( name )
local f = oldFindMetaTable( name )
if ( f ) then return f end

return metas[ name ]
end

If it does contain this code, then you may have another addon that is overwriting this file. Look at the next section for more information.

Another Addon Overwriting /lua/includes/init.lua file

If you have another addon that is overwriting the /lua/includes/init.lua file, you will need to find out which addon is doing this and remove or fix it. To help find this addon, you can try running this command in your server console:

lua_run local f,d=file.Find('addons/*', 'GAME') for i=1,#d do if file.Exists('addons/'..d[i]..'/lua/includes/init.lua','GAME') then print(d[i]) break end end

This command will output the name of the addon that is overwriting the file. You can then remove or fix the addon to prevent this error from happening.

If you are still having issues, I would recommend asking in the Garry's Mod Discord Server for help. Pulsar can only do so much to help you with this issue as it is not directly an issue with any of Pulsar's addons.

If you have any other questions or need help, feel free to ask in the Pulsar Discord Server. We are always happy to help!