Skip to content

NextBot NPC의 function ENT:OnKilled에 아이템 스폰 구문을 넣었을 경우 발생하는 오류 #1

@FrostyNow

Description

@FrostyNow
local items = {}
	
for k, v in pairs( nut.item.GetAll() ) do
	if (v.category == "폐품") then
		items[k] = v
	end
end
	
local RandomItem = table.Random(items)
nut.item.Spawn(self:GetPos() + Vector(0, 0, 8), nil, RandomItem)

위와 같은 코드로 생겨난 아이템을 조준할 시, 클라이언트 사이드에서 나오는 오류

[ERROR] gamemodes/nutscript/gamemode/libs/external/sh_pon.lua:406: attempt to call a nil value

  1. decode - gamemodes/nutscript/gamemode/libs/external/sh_pon.lua:406
  2. GetData - gamemodes/nutscript/entities/entities/nut_item.lua:40
    3. DrawTargetID - gamemodes/nutscript/entities/entities/nut_item.lua:64
    4. Run - gamemodes/nutscript/gamemode/kernel/cl_kernel.lua:401
    5. unknown - gamemodes/nutscript/gamemode/kernel/cl_kernel.lua:172

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions