Facepunch / garrysmod-issues

Garry's Mod issue tracker
139 stars 56 forks source link

player.GetCount() return as nil #3332

Closed kem008 closed 6 years ago

kem008 commented 6 years ago

GetCount return as nil.

[ERROR] gamemodes/hl2c-iceman/gamemode/server/init_postentity.lua:944: attempt to call field 'GetCount' (a nil value)
  1. unknown - gamemodes/hl2c-iceman/gamemode/server/init_postentity.lua:944
bigdogmat commented 6 years ago

You've probably overwritten the player global with a local in your scope.

kem008 commented 6 years ago

I cant find player.GetCount in the basic lua files. I didnt overwritten the player global.

neico commented 6 years ago

The entire point of the function is that it comes from the C side, so yes, you won't find it in a lua file.

And if you aren't overriding the global, then someone else is, try without addons etc.