Fixed! Seperator sep and int y = 0 are redefined every step of the loot.
Declare y in the beginning of the function and seperator sep must become a pointer!
edit: i get a fault with my delete , what am I doing wrong?
I think the problem is that on the last line, the new seperator does not return a correct pointer.
Zone loads fine if i have no delete, I put it at the end of the while loop, so not entirely sure what i did wrong.
add:
+ Seperator *sep = NULL;
+ int y = 0;
in the top of the function
change
- Seperator sep(spell_line, '^', 200, 100, false, 0, 0, false);
+ sep = new Seperator(spell_line, '^', 200, 100, false, 0, 0, false);
+ if(sep != NULL)
+ delete sep;
change all sep.(whatever) to sep->(whatever)
and add an additional if(sep) delete sep; line at the end of the function after the loop exits.
Last edited by Dakaar; 09-25-2005 at 12:06 AM..
|