Stupid GLua error tried everything still happens

So what im doing is UserMessage from sv to cl

so this is the code in SV


function GAMEMODE:ShowTeam( ply )
	--ply:ConCommand( "openinv" )
	umsg.Start( "NETOpenReport", ply ) -- Sending a message to the client.
    umsg.End()
end

i get


[ERROR] addons/admin-report/lua/autorun/sv_adminreport.lua:1: attempt to index global 'GAMEMODE' (a nil value)
  1. unknown - addons/admin-report/lua/autorun/sv_adminreport.lua:1



yes the whole system works cause i created an concommand for it!

change “GAMEMODE” to “GM”

You could use hook.Add(“ShowTeam”,“HookName”,YourFunction) because your code is for an addon and not a gamemode.

kk ill try DevShinx, btw polivlas that gives me nil too already tried

[editline]13th May 2015[/editline]

Thanks DevShinx Worked good :smiley: