Posted By: Dark_samurai
Pointer valid? - 08/12/08 19:07
Hi!
I have the following code:
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
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