Problem With Color Tool

Hello, I was searching for fix but I didnt find it so I hope anyone here can help me. Like 3 Days Ago I noticed that my color tool has name “tool.color.name” and it doesnt work. When The gui where I select color etc doesnt show and when I click on something, it only turns darker. I hope someone will send me.
Thanks. :rolleyes:

Newbie Since 2014 :quagmire:

I’d like to see a screenshot of your main menu, and contents of the file
C:\Program Files (x86)\Steam\SteamApps\common\GarrysMod\garrysmod\gamemodes\sandbox\entities\weapons\gmod_tool\stools.lua

http://s7.postimg.org/vb5frqd0r/Main_Menu.png

stools.lua

ToolObj = {}

include( ‘ghostentity.lua’ )
include( ‘object.lua’ )

if ( CLIENT ) then
include( ‘stool_cl.lua’ )
end

function ToolObj:Create()

local o = {}

setmetatable( o, self )
self.__index = self

o.Mode				= nil
o.SWEP				= nil
o.Owner				= nil
o.ClientConVar		= {}
o.ServerConVar		= {}
o.Objects			= {}
o.Stage				= 0
o.Message			= "start"
o.LastMessage		= 0
o.AllowedCVar		= 0

return o

end

function ToolObj:CreateConVars()

local mode = self:GetMode()

if ( CLIENT ) then

	for cvar, default in pairs( self.ClientConVar ) do
	
		CreateClientConVar( mode.."_"..cvar, default, true, true )
		
	end
	
return end

-- Note: I changed this from replicated because replicated convars don't work
-- when they're created via Lua.

if ( SERVER ) then

	self.AllowedCVar = CreateConVar( "toolmode_allow_"..mode, 1, FCVAR_NOTIFY )

end

end

function ToolObj:GetServerInfo( property )

local mode = self:GetMode()

return GetConVarString( mode.."_"..property )

end

function ToolObj:BuildConVarList()

local mode = self:GetMode()
local convars = {}

for k, v in pairs( self.ClientConVar ) do convars[ mode .. "_" .. k ] = v end

return convars

end

function ToolObj:GetClientInfo( property )

local mode = self:GetMode()
return self:GetOwner():GetInfo( mode.."_"..property )

end

function ToolObj:GetClientNumber( property, default )

default = default or 0
local mode = self:GetMode()
return self:GetOwner():GetInfoNum( mode.."_"..property, default )

end

function ToolObj:Allowed()

if ( CLIENT ) then return true end
return self.AllowedCVar:GetBool()

end

– Now for all the ToolObj redirects

function ToolObj:Init() end

function ToolObj:GetMode() return self.Mode end
function ToolObj:GetSWEP() return self.SWEP end
function ToolObj:GetOwner() return self:GetSWEP().Owner or self.Owner end
function ToolObj:GetWeapon() return self:GetSWEP().Weapon or self.Weapon end

function ToolObj:LeftClick() return false end
function ToolObj:RightClick() return false end
function ToolObj:Reload() self:ClearObjects() end
function ToolObj:Deploy() self:ReleaseGhostEntity() return end
function ToolObj:Holster() self:ReleaseGhostEntity() return end
function ToolObj:Think() self:ReleaseGhostEntity() end

–[[---------------------------------------------------------
Checks the objects before any action is taken
This is to make sure that the entities haven’t been removed
-----------------------------------------------------------]]
function ToolObj:CheckObjects()

for k, v in pairs( self.Objects ) do
	
	if ( !v.Ent:IsWorld() && !v.Ent:IsValid() ) then
		self:ClearObjects()
	end		

end

end

local toolmodes = file.Find( SWEP.Folder…"/stools/*.lua", “LUA” )

for key, val in pairs( toolmodes ) do

local char1,char2,toolmode = string.find( val, "([%w_]*).lua" )

TOOL = ToolObj:Create()
TOOL.Mode = toolmode

AddCSLuaFile( "stools/"..val )
include( "stools/"..val )

TOOL:CreateConVars()

SWEP.Tool[ toolmode ] = TOOL
	
TOOL = nil

end

ToolObj = nil

if ( CLIENT ) then

-- Keep the tool list handy
local TOOLS_LIST = SWEP.Tool

-- Add the STOOLS to the tool menu
local function AddSToolsToMenu()

	for ToolName, TOOL in pairs( TOOLS_LIST ) do
	
		if ( TOOL.AddToMenu != false ) then
		
			spawnmenu.AddToolMenuOption( TOOL.Tab or "Main",
											TOOL.Category or "New Category", 
											ToolName, 
											TOOL.Name or "#"..ToolName, 
											TOOL.Command or "gmod_tool "..ToolName, 
											TOOL.ConfigName or ToolName,
											TOOL.BuildCPanel )
			
		end
	
	end

end

hook.Add( "PopulateToolMenu", "AddSToolsToMenu", AddSToolsToMenu )


--
-- Search
--
search.AddProvider( function( str )

	local list = {}

	for k, v in pairs( TOOLS_LIST ) do

		if ( !k:find( str ) ) then continue end

		local entry = {
			text = v.Name or "#" .. k,
			icon = spawnmenu.CreateContentIcon( "tool", nil, {
				spawnname = k,
				nicename = v.Name or "#" .. k
			} ),
			words = { k }
		}
		
		table.insert( list, entry )

		if ( #list >= 32 ) then break end

	end

	return list

end )

--
-- Tool spawnmenu icon
--
spawnmenu.AddContentType( "tool", function( container, obj )

	if ( !obj.spawnname ) then return end

	local icon = vgui.Create( "ContentIcon", container )
	icon:SetContentType( "tool" )
	icon:SetSpawnName( obj.spawnname )
	icon:SetName( obj.nicename or "#tool." .. obj.spawnname .. ".name" )
	icon:SetMaterial( "gui/tool.png" )

	icon.DoClick = function()

		spawnmenu.ActivateTool( obj.spawnname )

		surface.PlaySound( "ui/buttonclickrelease.wav" )

	end

	icon.OpenMenu = function( icon )

		local menu = DermaMenu()
			menu:AddOption( "Delete", function() icon:Remove() hook.Run( "SpawnlistContentChanged", icon ) end )
		menu:Open()
					
	end
	
	if ( IsValid( container ) ) then
		container:Add( icon )
	end

	return icon

end )

end

Sorry, I wanted weapons\gmod_tool\stools\color.lua, not weapons\gmod_tool\stools.lua, my bad.

Why do you have non English text in your main menu if you have set English language I wonder.

Yep, I did. Wait a while.

[editline]16th October 2014[/editline]

colour.lua
----------------------------------------------------------------------------

TOOL.Category = “Render”
TOOL.Name = “#tool.colour.name”

TOOL.ClientConVar[ “r” ] = 255
TOOL.ClientConVar[ “g” ] = 0
TOOL.ClientConVar[ “b” ] = 255
TOOL.ClientConVar[ “a” ] = 255
TOOL.ClientConVar[ “mode” ] = “0”
TOOL.ClientConVar[ “fx” ] = “0”

local function SetColour( Player, Entity, Data )

--
-- If we're trying to make them transparent them make the render mode
-- a transparent type. This used to fix in the engine - but made HL:S props invisible(!)
--
if ( Data.Color && Data.Color.a < 255 && Data.RenderMode == 0 ) then
	Data.RenderMode = 1
end

if ( Data.Color ) then Entity:SetColor( Color( Data.Color.r, Data.Color.g, Data.Color.b, Data.Color.a ) ) end
if ( Data.RenderMode ) then Entity:SetRenderMode( Data.RenderMode ) end
if ( Data.RenderFX ) then Entity:SetKeyValue( "renderfx", Data.RenderFX ) end

if ( SERVER ) then
	duplicator.StoreEntityModifier( Entity, "colour", Data )
end

end
duplicator.RegisterEntityModifier( “colour”, SetColour )

function TOOL:LeftClick( trace )

local ent = trace.Entity
if ( IsValid( ent.AttachedEntity ) ) then ent = ent.AttachedEntity end

if IsValid( ent ) then -- The entity is valid and isn't worldspawn

	if ( CLIENT ) then return true end

	local r = self:GetClientNumber( "r", 0 )
	local g = self:GetClientNumber( "g", 0 )
	local b = self:GetClientNumber( "b", 0 )
	local a = self:GetClientNumber( "a", 0 )
	local fx = self:GetClientNumber( "fx", 0 )
	local mode = self:GetClientNumber( "mode", 0 )

	SetColour( self:GetOwner(), ent, { Color = Color( r, g, b, a ), RenderMode = mode, RenderFX = fx } )

	return true
	
end

end

function TOOL:RightClick( trace )

local ent = trace.Entity
if ( IsValid( ent.AttachedEntity ) ) then ent = ent.AttachedEntity end

if IsValid( ent ) then -- The entity is valid and isn't worldspawn

	if ( CLIENT ) then return true end

	SetColour( self:GetOwner(), ent, { Color = Color( 255, 255, 255, 255 ), RenderMode = 0, RenderFX = 0 } )
	return true

end

end

local ConVarsDefault = TOOL:BuildConVarList()

function TOOL.BuildCPanel( CPanel )

CPanel:AddControl( "Header", { Description	= "#tool.colour.desc" } )

CPanel:AddControl( "ComboBox", { MenuButton = 1, Folder = "colour", Options = { [ "#preset.default" ] = ConVarsDefault }, CVars = table.GetKeys( ConVarsDefault ) } )

CPanel:AddControl( "Color", { Label = "#tool.colour.color", Red = "colour_r", Green = "colour_g", Blue = "colour_b", Alpha = "colour_a" } )

CPanel:AddControl( "ComboBox", { Label = "#tool.colour.mode", Options = list.Get( "RenderModes" ) } )
CPanel:AddControl( "ComboBox", { Label = "#tool.colour.fx", Options = list.Get( "RenderFX" ) } )

end

list.Set( “RenderModes”, “#rendermode.normal”, { colour_mode = 0 } )
list.Set( “RenderModes”, “#rendermode.transcolor”, { colour_mode = 1 } )
list.Set( “RenderModes”, “#rendermode.transtexture”, { colour_mode = 2 } )
list.Set( “RenderModes”, “#rendermode.glow”, { colour_mode = 3 } )
list.Set( “RenderModes”, “#rendermode.transalpha”, { colour_mode = 4 } )
list.Set( “RenderModes”, “#rendermode.transadd”, { colour_mode = 5 } )
list.Set( “RenderModes”, “#rendermode.transalphaadd”, { colour_mode = 8 } )
list.Set( “RenderModes”, “#rendermode.worldglow”, { colour_mode = 9 } )

list.Set( “RenderFX”, “#renderfx.none”, { colour_fx = 0 } )
list.Set( “RenderFX”, “#renderfx.pulseslow”, { colour_fx = 1 } )
list.Set( “RenderFX”, “#renderfx.pulsefast”, { colour_fx = 2 } )
list.Set( “RenderFX”, “#renderfx.pulseslowwide”, { colour_fx = 3 } )
list.Set( “RenderFX”, “#renderfx.pulsefastwide”, { colour_fx = 4 } )
list.Set( “RenderFX”, “#renderfx.fadeslow”, { colour_fx = 5 } )
list.Set( “RenderFX”, “#renderfx.fadefast”, { colour_fx = 6 } )
list.Set( “RenderFX”, “#renderfx.solidslow”, { colour_fx = 7 } )
list.Set( “RenderFX”, “#renderfx.solidfast”, { colour_fx = 8 } )
list.Set( “RenderFX”, “#renderfx.strobeslow”, { colour_fx = 9 } )
list.Set( “RenderFX”, “#renderfx.strobefast”, { colour_fx = 10 } )
list.Set( “RenderFX”, “#renderfx.strobefaster”, { colour_fx = 11 } )
list.Set( “RenderFX”, “#renderfx.flickerslow”, { colour_fx = 12 } )
list.Set( “RenderFX”, “#renderfx.flickerfast”, { colour_fx = 13 } )
list.Set( “RenderFX”, “#renderfx.distort”, { colour_fx = 15 } )
list.Set( “RenderFX”, “#renderfx.hologram”, { colour_fx = 16 } )
list.Set( “RenderFX”, “#renderfx.pulsefastwider”, { colour_fx = 24 } )

Ok, try uninstalling some of your addons and verify game integrity of game cache.

Sorry for no responding, I didnt have time. So, I figured out, It’s server problem and I am not the only one that has the problem but for some people the tool is working.
So there are options
**1.**Try to tell owner about this to add like an Color Tool Addon.
**2.**Wait untill someone responds with solution.