what is wrong with this entity?

SHARED

ENT.Base = "base_ai" -- This entity is based on "base_ai"
ENT.Type = "ai" -- What type of entity is it, in this case, it's an AI.
ENT.AutomaticFrameAdvance = true -- This entity will animate itself.
ENT.Spawnable			= true
ENT.AdminSpawnable		= true
ENT.PrintName		= "NPC SHOP"
ENT.Author			= "Gustav"

 
function ENT:SetAutomaticFrameAdvance( bUsingAnim ) -- This is called by the game to tell the entity if it should animate itself.
	self.AutomaticFrameAdvance = bUsingAnim
end

**
INIT**

function ENT:Initialize( ) --This function is run when the entity is created so it's a good place to setup our entity.
 
	self:SetModel( "models/humans/group01/female_01.mdl" ) -- Sets the model of the NPC.
	self:SetHullType( HULL_HUMAN ) -- Sets the hull type, used for movement calculations amongst other things.
	self:SetHullSizeNormal( )
	self:SetNPCState( NPC_STATE_SCRIPT )
	self:SetSolid(  SOLID_BBOX ) -- This entity uses a solid bounding box for collisions.
	self:CapabilitiesAdd( CAP_ANIMATEDFACE | CAP_TURN_HEAD ) -- Adds what the NPC is allowed to do ( It cannot move in this case ).
	self:SetUseType( SIMPLE_USE ) -- Makes the ENT.Use hook only get called once at every use.
	self:DropToFloor()
 
	self:SetMaxYawSpeed( 90 ) --Sets the angle by which an NPC can rotate at once.
 
end

CL_INIT

local function myMenu()
	global. )
end
 
usermessage.Hook("ShopNPCUsed",myMenu) --Hook the menu, so we can use it Serverside

**

ERROR:**


Folder	=	entities/npc_shop
Couldn't register Scripted Entity npc_shop - the Type field is empty!

[editline]08:35PM[/editline]

-snip-

It might be you created it and didn’t restart your server and it didn’t load or

The error is in cl_init.lua
Change
[lua]
local function myMenu()
global. ) – Error
end
usermessage.Hook(“ShopNPCUsed”,myMenu) --Hook the menu, so we can use it Serverside
[/lua]
To
[lua]
local function myMenu()
–Derma code here
end
usermessage.Hook(“ShopNPCUsed”,myMenu) --Hook the menu, so we can use it Serverside
[/lua]

thx

FYI when you get the “Couldn’t register entity” error it almost always means there was an error in the code which should be higher up in the console.

Folder = entities/npc_shop
Initialize = function: 0266B7F0
Couldn’t register Scripted Entity npc_shop - the Type field is empty!

Much further up.

Post the whole of the new code.

That’s his error who knows.

:ninja:'d as soon as i posted.



Folder	=	entities/npc_shop
Couldn't register Scripted Entity npc_shop - the Type field is empty!
ERROR: Trying to derive entity sent_rg_bullet from non existant entity base_point!
Sending 271 'User Info' ConVars to server (cl_spewuserinfoconvars to see)
Redownloading all lightmaps
Cannot change maxplayers while the server is running
Dropped Gustavgr Aka Gussan Ze BigTroll from server (Disconnect by user.)
Lua initialized (Lua 5.1)
Registering gamemode 'Sandbox' derived from 'base'
Registering gamemode 'WW2RPScript' derived from 'Sandbox'
ScriptEnforce is disabled
Folder	=	entities/npc_shop
Initialize	=	function: 026FF978
Couldn't register Scripted Entity npc_shop - the Type field is empty!
Executing listen server config file
exec: couldn't exec listenserver.cfg
Attemped to precache unknown particle system "sidearm_smoke"!
Attemped to precache unknown particle system "muzzle_mg42"!
Attemped to precache unknown particle system "muzzle_rockets"!
InitFastCopy: only 51% fast props. Bug?
Lua initialized (Lua 5.1)
Registering gamemode 'Sandbox' derived from 'base'
Registering gamemode 'WW2RPScript' derived from 'Sandbox'
Attemped to precache unknown particle system "sidearm_smoke"!
Attemped to precache unknown particle system "sidearm_smoke"!
Attemped to precache unknown particle system "muzzle_mg42"!
Attemped to precache unknown particle system "muzzle_mg42"!
Attemped to precache unknown particle system "muzzle_rockets"!
Attemped to precache unknown particle system "muzzle_rockets"!
Folder	=	entities/npc_shop
Couldn't register Scripted Entity npc_shop - the Type field is empty!
ERROR: Trying to derive entity sent_rg_bullet from non existant entity base_point!
Sending 271 'User Info' ConVars to server (cl_spewuserinfoconvars to see)
Redownloading all lightmaps
CMaterial::DrawElements: No bound shader
CMaterial::DrawElements: No bound shader
CMaterial::DrawElements: No bound shader
CMaterial::DrawElements: No bound shader
CMaterial::DrawElements: No bound shader
Cannot change maxplayers while the server is running
Dropped Gustavgr Aka Gussan Ze BigTroll from server (Disconnect by user.)
Lua initialized (Lua 5.1)
Registering gamemode 'Sandbox' derived from 'base'
Registering gamemode 'WW2RPScript' derived from 'Sandbox'
ScriptEnforce is disabled
Folder	=	entities/npc_shop
Initialize	=	function: 0266B7F0
Couldn't register Scripted Entity npc_shop - the Type field is empty!
Executing listen server config file
exec: couldn't exec listenserver.cfg
Attemped to precache unknown particle system "sidearm_smoke"!
Attemped to precache unknown particle system "muzzle_mg42"!
Attemped to precache unknown particle system "muzzle_rockets"!
InitFastCopy: only 51% fast props. Bug?
Lua initialized (Lua 5.1)
Registering gamemode 'Sandbox' derived from 'base'
Registering gamemode 'WW2RPScript' derived from 'Sandbox'
Attemped to precache unknown particle system "sidearm_smoke"!
Attemped to precache unknown particle system "sidearm_smoke"!
Attemped to precache unknown particle system "muzzle_mg42"!
Attemped to precache unknown particle system "muzzle_mg42"!
Attemped to precache unknown particle system "muzzle_rockets"!
Attemped to precache unknown particle system "muzzle_rockets"!
Folder	=	entities/npc_shop
Couldn't register Scripted Entity npc_shop - the Type field is empty!
ERROR: Trying to derive entity sent_rg_bullet from non existant entity base_point!
Sending 271 'User Info' ConVars to server (cl_spewuserinfoconvars to see)
Redownloading all lightmaps
CMaterial::DrawElements: No bound shader
Giving Gustavgr Aka Gussan Ze BigTroll a weapon_fiveseven
Giving Gustavgr Aka Gussan Ze BigTroll a weapon_fiveseven
Giving Gustavgr Aka Gussan Ze BigTroll a weapon_ak47
Giving Gustavgr Aka Gussan Ze BigTroll a weapon_ak47
Giving Gustavgr Aka Gussan Ze BigTroll a weapon_pumpshotgun
CMaterial::DrawElements: No bound shader
CMaterial::DrawElements: No bound shader
Giving Gustavgr Aka Gussan Ze BigTroll a weapon_tmp
] dsa
Unknown command: dsa
Cannot change maxplayers while the server is running
Dropped Gustavgr Aka Gussan Ze BigTroll from server (Disconnect by user.)
Lua initialized (Lua 5.1)
Registering gamemode 'Sandbox' derived from 'base'
Registering gamemode 'WW2RPScript' derived from 'Sandbox'
ScriptEnforce is disabled
Folder	=	entities/npc_shop
Initialize	=	function: 02685020
Couldn't register Scripted Entity npc_shop - the Type field is empty!
Executing listen server config file
exec: couldn't exec listenserver.cfg
Attemped to precache unknown particle system "sidearm_smoke"!
Attemped to precache unknown particle system "muzzle_mg42"!
Attemped to precache unknown particle system "muzzle_rockets"!
InitFastCopy: only 51% fast props. Bug?
Lua initialized (Lua 5.1)
Registering gamemode 'Sandbox' derived from 'base'
Registering gamemode 'WW2RPScript' derived from 'Sandbox'
Attemped to precache unknown particle system "sidearm_smoke"!
Attemped to precache unknown particle system "sidearm_smoke"!
Attemped to precache unknown particle system "muzzle_mg42"!
Attemped to precache unknown particle system "muzzle_mg42"!
Attemped to precache unknown particle system "muzzle_rockets"!
Attemped to precache unknown particle system "muzzle_rockets"!
Folder	=	entities/npc_shop
Couldn't register Scripted Entity npc_shop - the Type field is empty!
ERROR: Trying to derive entity sent_rg_bullet from non existant entity base_point!
Sending 271 'User Info' ConVars to server (cl_spewuserinfoconvars to see)
Redownloading all lightmaps
CMaterial::DrawElements: No bound shader
Unknown command: ulx
You received $40 salary.
Cannot change maxplayers while the server is running
Dropped Gustavgr Aka Gussan Ze BigTroll from server (Disconnect by user.)
Lua initialized (Lua 5.1)
Registering gamemode 'Sandbox' derived from 'base'
Registering gamemode 'WW2RPScript' derived from 'Sandbox'
ScriptEnforce is disabled
Folder	=	entities/npc_shop
Initialize	=	function: 026AD130
Couldn't register Scripted Entity npc_shop - the Type field is empty!
Executing listen server config file
exec: couldn't exec listenserver.cfg
Attemped to precache unknown particle system "sidearm_smoke"!
Attemped to precache unknown particle system "muzzle_mg42"!
Attemped to precache unknown particle system "muzzle_rockets"!
InitFastCopy: only 51% fast props. Bug?
Lua initialized (Lua 5.1)
Registering gamemode 'Sandbox' derived from 'base'
Registering gamemode 'WW2RPScript' derived from 'Sandbox'
Attemped to precache unknown particle system "sidearm_smoke"!
Attemped to precache unknown particle system "sidearm_smoke"!
Attemped to precache unknown particle system "muzzle_mg42"!
Attemped to precache unknown particle system "muzzle_mg42"!
Attemped to precache unknown particle system "muzzle_rockets"!
Attemped to precache unknown particle system "muzzle_rockets"!
Folder	=	entities/npc_shop
Couldn't register Scripted Entity npc_shop - the Type field is empty!
ERROR: Trying to derive entity sent_rg_bullet from non existant entity base_point!
Sending 271 'User Info' ConVars to server (cl_spewuserinfoconvars to see)
Redownloading all lightmaps
prop_physics killed Gustavgr Aka Gussan Ze BigTroll.
Dropped Gustavgr Aka Gussan Ze BigTroll from server (Disconnect by user.)
maxplayers set to 1
Lua initialized (Lua 5.1)
Registering gamemode 'Sandbox' derived from 'base'
Registering gamemode 'WW2RPScript' derived from 'Sandbox'
ScriptEnforce is disabled
Folder	=	entities/npc_shop
Initialize	=	function: 026748E0
Couldn't register Scripted Entity npc_shop - the Type field is empty!
Executing listen server config file
exec: couldn't exec listenserver.cfg
Attemped to precache unknown particle system "sidearm_smoke"!
Attemped to precache unknown particle system "muzzle_mg42"!
Attemped to precache unknown particle system "muzzle_rockets"!
InitFastCopy: only 51% fast props. Bug?
Lua initialized (Lua 5.1)
Registering gamemode 'Sandbox' derived from 'base'
Registering gamemode 'WW2RPScript' derived from 'Sandbox'
Attemped to precache unknown particle system "sidearm_smoke"!
Attemped to precache unknown particle system "sidearm_smoke"!
Attemped to precache unknown particle system "muzzle_mg42"!
Attemped to precache unknown particle system "muzzle_mg42"!
Attemped to precache unknown particle system "muzzle_rockets"!
Attemped to precache unknown particle system "muzzle_rockets"!
Folder	=	entities/npc_shop
Couldn't register Scripted Entity npc_shop - the Type field is empty!
ERROR: Trying to derive entity sent_rg_bullet from non existant entity base_point!


NO. Find the error yourself, it should be highlighted in yellow or blue.

Folder = entities/npc_shop
Initialize = function: 026FF978
Couldn’t register Scripted Entity npc_shop - the Type field is empty!

thats all i see

Serverside maybe blown copy eet…

yuzz me noh understend yos

We’re trying to help you and you’re trolling, and wasting our time.

then dont waste your time if you think im a troll.

I’m confused, do you want our help or not?

yes, thats why im posting here X(

And yet you argue with the people attempting to give said help, over one little spelling mistake? Don’t forget, not everyone on Facepunch is english.

please help me or do not post, your just making this shit bigger, well do not reply anymore.

If you’re still having trouble, try downloading and editing the working example at the bottom of the tutorial page.

thats what im trying to :confused: