Attempted to create unknown entity type OCDM_WeaponNPC!
Hook ‘Spawnnpcs’ Failed: [@gamemodes\ocdm\gamemode\init.lua:248] Tried to use a NULL entity!
^ Is the error i get when my NPC spawn (Keep in mind its a shop NPC)
Here is the code for line 248:
[lua]
NPC:SetPos(Vector(-558, -1367, -66));
[/lua]
And here is the entire NPC spawn code:
[lua]
function SpawnNPCs()
local NPC = ents.Create(“OCDM_WeaponNPC”);
NPC:SetPos(Vector(-558, -1367, -66));
NPC:SetAngles(Angle(2, 43, 0));
NPC:Spawn();
end
hook.Add( “InitPostEntity”, “Spawnnpcs”, SpawnNPCs)
[/lua]
This started after the GMod update. I really hope someone can provide me a fix for this problem.
I think you have to change the folder name to lower case also.
EDIT* Oh nevermind, you didn’t understand what I was talking about. Yeah what portal said, change this OCDM_WeaponNPC, to this ocdm_weaponnpc . Not sure if you will have to make the folder lowercase or not.