Hi!
I have the following code:

Code:
entity* temppointer;

function blabla()
{
   var savepointer;
   savepointer = you;
   you = null;
   while(1)
   {
      temppointer = savepointer;
      if(temppointer == NULL) {return(-1);}
      wait(1);
   }
}


But this function will never return -1 because it never goes into the if, even if the you entity is removed. So how can I check if a pointer is still valid even if the pointer isn't set to null from another function?

Thanks for your help!

Dark_Samurai


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version