[ERROR] addons/darkrp_test/lua/entities/ent_test/cl_init.lua:101: attempt to index global ‘LocalPlayer’ (a function value)

  1. func - addons/darkrp_test/lua/entities/ent_test/cl_init.lua:101
  2. unknown - lua/includes/extensions/net.lua:32

Im constantly getting this error,
any help would be amazing.
Thanks :slight_smile:

LocalPlayer -> LocalPlayer()?

This is the line of code

function LocalPlayer()

hook.Add(“PlayerStartVoice”, “WhoIsTalkingOnTheRadio” )

        playerjob = vgui.Create("DLabel", playerframe)	
        playerjob:SetText( LocalPlayer():getJobTable().name )
        playerjob:SetColor( LocalPlayer():getJobTable().color )

Why is LocalPlayer() a function?
That does not make anysense.

okay xd
I will remove it then retry

[editline]27th November 2016[/editline]

Fixed this alone :slight_smile: