View Single Post
Re: Problems with Entity scanning
Old
  (#2)
jeefo
путинхуйлоебаное
 
jeefo's Avatar
 
Status: Offline
Posts: 452
Join Date: Nov 2005
Location: Saint-Petersburg
Default Re: Problems with Entity scanning - 17-07-2006

Probably entity is null. Use something like this;

PHP Code:
edict_t *ent NULL;

for (
int entIndex 0entIndex gpGlobals->maxEntitiesentIndex++)
{
   
ent INDEXENT (entIndex);

   if (
FNullEnt (ent))
      continue;

   
g_engfuncs.pfnServerPrint (STRING (ent->v.classname));
   
g_engfuncs.pfnServerPrint ("\n");

Should work without a problem.
  
Reply With Quote