Wierdo base error, HUDItemPickedUp

Hi Facepunchers.

I got (and get) this wierd error after I added a team selection menu in my gamemode;

ERROR: GAMEMODE:‘HUDItemPickedUp’ Failed: base\gamemode\cl_hudpickup.lua:44: attempt to call method ‘Alive’ (a nil value)

What the :woop: is up with that?

Oliver

It’s probably calling the function before the player entity exists, add some [lua]if not(LocalPlayer()) then return end[/lua] checks.

Thanks, that worked :-D.