I am getting this error message and I dont know why/how:
[ERROR] gamemodes/groundcontrol/gamemode/sv_player.lua:380: attempt to call method 'isPlayer' (a nil value)
1. unknown - gamemodes/groundcontrol/gamemode/sv_player.lua:380
2. FireBullets - [C]:-1
3. FireBullet - lua/weapons/cw_base/sh_bullets.lua:82
4. unknown - lua/weapons/cw_base/shared.lua:1553
The error points me here:
local attacker = dmgInfo:GetAttacker()
local damage = dmgInfo:GetDamage()
local differentTeam
if attacker:IsPlayer() then
differentTeam = attacker:Team() ~= ply:Team() -- right here <-----
end
if attacker ~= ply and attacker:IsPlayer() then
if CurTime() < ply.invincibilityPeriod then -- player is still invincible after spawning, remove any damage done and don't do anything
dmgInfo:ScaleDamage(0)
return
end
end
I desperately want this to fix because I got plenty of friends who want to play it together