This message is in MIME format. Since your mail reader does not understand this 
format, some or all of this message may not be legible.
--
hi,
 i think you forgot implant data map
here is example of CMyModelEntity  (sdk_modelentity.cpp)
BEGIN_DATADESC( CMyModelEntity )

        // Save/restore our active state
        DEFINE_FIELD( m_bActive, FIELD_BOOLEAN ),
        DEFINE_FIELD( m_flNextChangeTime, FIELD_TIME ),

        // Links our input name from Hammer to our input member function
        DEFINE_INPUTFUNC( FIELD_VOID, "Toggle", InputToggle ),

        // Declare our think function
        DEFINE_THINKFUNC( MoveThink ),

END_DATADESC()

You also need to add
        DECLARE_DATADESC();
in your class declaration

As in this example, you need to declare your think function by
DEFINE_THINKFUNC(MyThinkFunction),
between BEGIN_DATADESC( MyClass) and END_DATADESC()


------------------------------------------------------------ Beg0 - [EMAIL 
PROTECTED] codeur sur le mod F.F.I² pour Half-Life² 
http://www.ffi2.tk/------------------------------------------------------------

> De: Heritage <[EMAIL PROTECTED]>
> A: [email protected]
> Objet: [hlcoders] questionn about this ASSERT error "FUNCTION NOT IN TABLE"
> Date: Tue, 31 May 2005 19:26:05 -0700

> void CBaseEntity::FunctionCheck( void *pFunction, char *name )
> {
> #ifdef USES_SAVERESTORE
>  // Note, if you crash here and your class is using multiple inheritance, it 
> is
>  // probably the case that CBaseEntity (or a descendant) is not the first
>  // class in your list of ancestors, which it must be.
>  if (pFunction && !UTIL_FunctionToName( GetDataDescMap(), pFunction ) )
>  {
>   Warning( "FUNCTION NOT IN TABLE!: %s:%s (%08lx)\n",
> STRING(m_iClassname), name, (unsigned long)pFunction );
>   Assert(0);
>  }
>
>
>
> I get the assert here when i call SetThink(&MyClass::MyThinkFunction);
> inside my Spawn method
>
> im not really sure what this really means
>
> My class is set up like this (minus the methods and members...)
>
> class MyClass: public CBaseEntity
> {
>       DECLARE_CLASS( MyClass, CBaseEntity );
>       void MyThinkFunction();
>       virtual void Spawn();
> };
>
> MyClass* blah = (MyClass*)CreateEntityByName("my_class_name");
> blah->Spawn();
>
> am i missing something?
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives, please 
> visit:
> <a 
> href=http://list.valvesoftware.com/mailman/listinfo/hlcoders>http://list.valvesoftware.com/mailman/listinfo/hlcoders</a>

Protek-on: CaraMail met en oeuvre un nouveau Concept de Sécurité Globale - 
www.caramail.com
--


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to