View Single Post
Re: Bug-NUM_FOR_EDICT Error: Bad Pointer
Old
  (#47)
sPlOrYgOn
<-- He did it.
 
sPlOrYgOn's Avatar
 
Status: Offline
Posts: 1,558
Join Date: Jan 2004
Location: Los Angeles, California, USA, North America, Earth, Solar System, Milky Way.
Default Re: Bug-NUM_FOR_EDICT Error: Bad Pointer - 14-05-2004

actually what i did was this...
Code:
int bleh () { return 0; }
int blah = 0;
// then in the ENTINDEX and INDEXENT
if (FNullEnt (pEdict)) blah = 1 / bleh();
I didn't put that in the above example just to simplify the example..
Did that to stop MSVC from complaining...
so annoying...
[edit]
okay now my ENTINDEX and INDEXENT functions look like this..
Code:
inline int	  ENTINDEX(edict_t *pEdict)			{ if (STRING (pEdict->v.classname)[0] == 0); return (*g_engfuncs.pfnIndexOfEdict)(pEdict); }
inline edict_t* INDEXENT( int iEdictNum )		{ if (iEdictNum == 0) iEdictNum /= iEdictNum; return (*g_engfuncs.pfnPEntityOfEntIndex)(iEdictNum); }
still won't make it crash...
I'm really starting to think that these 2 functions aren't causing it..
[/edit]

Last edited by sPlOrYgOn; 14-05-2004 at 07:01..