You might want to do some more sanity checking on the function, in case it was called from for instance a call_out. (Although you might want to rewrite call_out so it keeps the user object.)
I bet this crashes now, for instance: call_out(this_user,0);
I suggest putting, in the (base) user class: constant is_user_object=1;
and a sanity check in the this_user function, like this,
array b=backtrace(); if (sizeof(b)>4 && ...b[4]...->is_user_object) return it; foreach (b;;array v) if (...v...->is_user_object) return it; return 0;
/ Mirar
Previous text:
2003-08-29 13:43: Subject: Problems with Backtrace
Well, I guess we don't, then! Changed the -2 to a 4, after realizing my user object stays in the same location (so far) in reletion to the start of the backtrace array and now it works wonderfully.
Now is time to go back and wreak more Havoc upon my poor server, with a working this_user(), muahaha. Thanks again.
Kaylus
/ kaylus