Raised This Month: $51 Target: $400
 12% 

[EXTENSION] NPCs in CS:S (extended)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 04-09-2018 , 12:34   Re: [EXTENSION] NPCs in CS:S (extended)
Reply With Quote #11

Moved operator definitions to *.cpp and there is no more g_pMemAlloc errors. But it's not really good, somehow the compiler omits the include with the pointer it may be caused by loop-including.
Now I have two errors:
1) "random", I think I understand why it happens..but at the moment I see no other solution than making changes to the SDK... though I'm pretty sure it is possible to redefine it somehow so it would work properly.
2) This is the problems I wrote about 2 posts ago, these templates and macroses are absolutely not clear to me.
If anybody can fix it, than we can move on.

Code:
In file included from /home/d/SDK/sourcemod/extensions/npc/Extension/CEntity/AI/CAI_Navigator.h:16:0,
                 from /home/d/SDK/sourcemod/extensions/npc/Extension/CEntity/Class/CAI_NPC.h:10,
                 from /home/d/SDK/sourcemod/extensions/npc/Extension/CEntity/Class/CCycler_Fix.h:5,
                 from /home/d/SDK/sourcemod/extensions/npc/Extension/SM/npc_custom.h:6,
                 from /home/d/SDK/sourcemod/extensions/npc/Extension/SM/CustomNpcManager.cpp:3:
/home/d/SDK/hl2sdk-css/game/shared/simtimer.h: In member function ‘void CSimpleSimTimer::Set(float, float)’:
/home/d/SDK/hl2sdk-css/game/shared/simtimer.h:57:42: error: request for member ‘RandomFloat’ in ‘random’, which is of non-class type ‘long int() throw ()’
    m_next = gpGlobals->curtime + random->RandomFloat( minInterval, maxInterval );
                                          ^
/home/d/SDK/hl2sdk-css/game/shared/simtimer.h: In member function ‘void CRandSimTimer::Set(float, float, bool)’:
/home/d/SDK/hl2sdk-css/game/shared/simtimer.h:141:43: error: request for member ‘RandomFloat’ in ‘random’, which is of non-class type ‘long int() throw ()’
     m_next = gpGlobals->curtime + random->RandomFloat( m_minInterval, m_maxInterval );
                                           ^
/home/d/SDK/hl2sdk-css/game/shared/simtimer.h: In member function ‘void CRandSimTimer::Reset()’:
/home/d/SDK/hl2sdk-css/game/shared/simtimer.h:150:42: error: request for member ‘RandomFloat’ in ‘random’, which is of non-class type ‘long int() throw ()’
    m_next = gpGlobals->curtime + random->RandomFloat( m_minInterval, m_maxInterval );
                                          ^
/home/d/SDK/hl2sdk-css/game/shared/simtimer.h: In member function ‘void CRandStopwatch::Start(float, float)’:
/home/d/SDK/hl2sdk-css/game/shared/simtimer.h:281:42: error: request for member ‘RandomFloat’ in ‘random’, which is of non-class type ‘long int() throw ()’
    m_next = gpGlobals->curtime + random->RandomFloat( minOverride, maxOverride );
                                          ^
In file included from /home/d/SDK/sourcemod/extensions/npc/Extension/CEntity/CEntity.h:100:0,
                 from /home/d/SDK/sourcemod/extensions/npc/Extension/CEntity/IEntityFactory.h:24,
                 from /home/d/SDK/sourcemod/extensions/npc/Extension/SM/CustomNpcManager.h:5,
                 from /home/d/SDK/sourcemod/extensions/npc/Extension/SM/CustomNpcManager.cpp:2:
/home/d/SDK/sourcemod/extensions/npc/Extension/CEntity/Class/CAI_NPC.h: In member function ‘virtual void CNPCBaseInteractive<NPC_CLASS>::InitDataMap()’:
/home/d/SDK/sourcemod/extensions/npc/Extension/CEntity/macros.h:42:56: error: there are no arguments to ‘BaseEntity’ that depend on a template parameter, so a declaration of ‘BaseEntity’ must be available [-fpermissive]
   datamap_t *pMap = gamehelpers->GetDataMap(BaseEntity()); \
                                                        ^
/home/d/SDK/sourcemod/extensions/npc/Extension/CEntity/Class/CAI_NPC.h:2019:2: note: in expansion of macro ‘CE_DECLARE_CLASS’
  CE_DECLARE_CLASS( CNPCBaseInteractive, NPC_CLASS );
  ^
/home/d/SDK/sourcemod/extensions/npc/Extension/CEntity/macros.h:42:56: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
   datamap_t *pMap = gamehelpers->GetDataMap(BaseEntity()); \
                                                        ^
/home/d/SDK/sourcemod/extensions/npc/Extension/CEntity/Class/CAI_NPC.h:2019:2: note: in expansion of macro ‘CE_DECLARE_CLASS’
  CE_DECLARE_CLASS( CNPCBaseInteractive, NPC_CLASS );
  ^
In file included from /home/d/SDK/mmsource-1.10/core/sourcehook/sh_vector.h:14:0,
                 from /home/d/SDK/mmsource-1.10/core/sourcehook/sh_stack.h:15,
                 from /home/d/SDK/sourcemod/extensions/npc/Extension/SM/CustomNpcManager.h:6,
                 from /home/d/SDK/sourcemod/extensions/npc/Extension/SM/CustomNpcManager.cpp:2:
/home/d/SDK/sourcemod/extensions/npc/Extension/SM/CustomNpcManager.cpp: In member function ‘void SM_CustomNPCEntityFactory::AddToList(char*)’:
/home/d/SDK/sourcemod/extensions/npc/Extension/SM/CustomNpcManager.cpp:25:10: error: ‘EntityFactoryDictionary_CE’ was not declared in this scope
   assert(EntityFactoryDictionary_CE);
          ^
/home/d/SDK/sourcemod/extensions/npc/Extension/SM/CustomNpcManager.cpp: In member function ‘virtual IServerNetworkable* SM_CustomNPCEntityFactory::Create(const char*)’:
/home/d/SDK/sourcemod/extensions/npc/Extension/SM/CustomNpcManager.cpp:31:83: error: ‘EntityFactoryDictionary_CE’ was not declared in this scope
   IEntityFactoryReal *pFactory = (IEntityFactoryReal *)EntityFactoryDictionary_CE()->FindFactory("cycler");
                                                                                   ^
/home/d/SDK/sourcemod/extensions/npc/Extension/SM/CustomNpcManager.cpp: In member function ‘virtual void SM_CustomNPCEntityFactory::Destroy(IServerNetworkable*)’:
/home/d/SDK/sourcemod/extensions/npc/Extension/SM/CustomNpcManager.cpp:39:83: error: ‘EntityFactoryDictionary_CE’ was not declared in this scope
   IEntityFactoryReal *pFactory = (IEntityFactoryReal *)EntityFactoryDictionary_CE()->FindFactory("cycler");
                                                                                   ^
/home/d/SDK/sourcemod/extensions/npc/Extension/SM/CustomNpcManager.cpp: In member function ‘virtual size_t SM_CustomNPCEntityFactory::GetEntitySize()’:
/home/d/SDK/sourcemod/extensions/npc/Extension/SM/CustomNpcManager.cpp:46:83: error: ‘EntityFactoryDictionary_CE’ was not declared in this scope
   IEntityFactoryReal *pFactory = (IEntityFactoryReal *)EntityFactoryDictionary_CE()->FindFactory("cycler");
                                                                                   ^
/home/d/SDK/sourcemod/extensions/npc/Extension/SM/CustomNpcManager.cpp: In member function ‘virtual CEntity* CustomNPCManager::Create(edict_t*, CBaseEntity*)’:
/home/d/SDK/sourcemod/extensions/npc/Extension/SM/CustomNpcManager.cpp:75:11: error: ‘class CE_NPC_Custom’ has no member named ‘Init’
  pOurEnt->Init(pEdict, pEnt);
           ^
/home/d/SDK/sourcemod/extensions/npc/Extension/SM/CustomNpcManager.cpp: In member function ‘int CustomNPCManager::AddCustomNPC(SourcePawn::IPluginContext*, unsigned int)’:
/home/d/SDK/sourcemod/extensions/npc/Extension/SM/CustomNpcManager.cpp:151:22: error: ‘EF_CE_PostInit’ was not declared in this scope
  sp_npc->sp_function[EF_##f_name] = the_sp->GetFunctionByName("M_"#f_name);\
                      ^
/home/d/SDK/sourcemod/extensions/npc/Extension/SM/CustomNpcManager.cpp:233:2: note: in expansion of macro ‘DECLARE_SP_FUNCTION’
  DECLARE_SP_FUNCTION(CE_PostInit);
  ^

Last edited by kadet.89; 04-09-2018 at 12:51.
kadet.89 is offline
Send a message via Skype™ to kadet.89
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:14.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode