• Problem with custom entity
    5 replies, posted
(Old problem/Removed)________________________________________________________________________ Okay onto the unsolved problem: Timer Error: ...tstand\entities\entities\zombie_spawn_point\init.lua:35: attempt to index global 'self' (a nil value) Timer Error: ...tstand\entities\entities\zombie_spawn_point\init.lua:24: attempt to index local 'tr' (a nil value) Code: timer.Create( "ZombieSpawnTime", 15, 0, function( tr, ent ) -- local tr = self:GetPos() local percent = math.random(1,100) if percent <= 50 then local ent = ents.Create( "npc_zombie" ) ent:SetPos( tr.HitPos )--------24 ent:Spawn() ent:Activate() end end ) timer.Create( "ZombieSpawnTimer", 15, 0, function( tr, ent ) local tr = self:GetPos()-----------35 local percent = math.random(1,100) if percent <= 80 then local ent = ents.Create( "npc_fastzombie" ) ent:SetPos( tr.HitPos ) ent:Spawn() ent:Activate() end end ) Any ideas? EDIT: Bump, shamelessly!
You missed a comma between "ZombieSpawnTimer" and 15:wink:
Well i did post it in the noob section. XD BUMP
Bumpppppppp
Lua tags please
Sorry, you need to Log In to post a reply to this thread.