Creating a Valid entity

The error

I have no idea where to start with this error ;-;



Attempted to create unknown entity type i_item!
false

[ERROR] addons/inventory/lua/autorun/nocturnalinventory/libraries/core/sv_init.lua:28: Tried to use a NULL entity!
  1. SetPos - [C]:-1
   2. SpawnItem - addons/inventory/lua/autorun/nocturnalinventory/libraries/core/sv_init.lua:28
    3. unknown - addons/inventory/lua/autorun/nocturnalinventory/libraries/core/items.lua:81
     4. unknown - lua/includes/modules/concommand.lua:54



The attempt to create the entity



local meta = FindMetaTable("Player")

function meta:SpawnItem( item )
	if(Inventory.Items.Stored[item])then
		local tr = self:EyeTrace(100)
                local entItem = ents.Create("i_item")
		print(entItem:IsValid())
                entItem:SetPos(tr.HitPos)
                entItem.Unique = item
		entItem.Model = item.Model
                entItem:Spawn()
	else
		print("No item registered as: "..item)
	end
end


The Eyetrace function



function meta:EyeTrace( dis )

	local tr = {}

	tr.start = self:GetShootPos()

	tr.endpos = tr.start + (self:GetAimVector() * dis)

	tr.filter = self

	tr = util.TraceLine(tr)

	return tr

end


i_item is an non existing item, and has to be coded yet.

I figured that and thats why im asking for help

I dont know how the database works, try creating an dummy entity which does nothing.