//////////////////////////////
// this function checks to see if the var has changed, and if it has we alter the string in the text to match it
//////////////////////////////
void monitor_for_var_change(TEXT* loc_text)
{
while(loc_text)
wait(1);
sys_exit("");
}
Yes I Have made sure that skill_y holds the text. when the function runs the panel and the text both disappear. I simply need the function itself that checks for the text to end so I do not have pointer errors (I removed code that had nothing to do with the problem and I removed that from my own code to see if it might be the issue.
void destory_foxpan(PANEL* fox_pan)
{
TEXT* mytext = ptr_for_handle(fox_pan.skill_y);
//////////////////////////////
// we remove the text
//////////////////////////////
ptr_remove(mytext);
mytext = NULL;
//////////////////////////////
// we remove the panel
//////////////////////////////
ptr_remove(fox_pan);
}