"attempt to call method (a nil value)"

I’ve been trying to fix up Zmod for a tiny bit. But after launching it i get the error “attempt to call method (a nil value)”.
Another guy tried doing the same thing i did but failed after awhile. But he was sent this.

The problem is you need to check if v is an npc.

if (v:IsNPC() and v:Disposition(self) == 1) || (v:IsPlayer() && GetConVarNumber(“ai_ignoreplayers”) == 0) then

The “v:IsNPC()” was not there before. I have tried putting that in but i get a new error saying it cannot spawn the zombie as it says 'Attempted to create unknown entity type slow_zombies!"
Can someone help me please

Here is the whole code

Attempted to create unknown entity type slow_zombies!

That means that that entity doesn’t exist.
It’s either:

  1. Broken, i.e. Lua Errors
  2. No code for the entity exist, in which case you’ll either have to create the entity from scratch ( or find the code for it somewhere ) or don’t create that entity at all. Or replace it with npc_zombie or something.

Well the thing is when the ISNPC is not put in the code the zombies spawn

Not that zombie, no.

I can’t tell you more without more code, inside the if.