Hi, my problem here is this. im trying to make an online race editor, so
i've got the int's maxRace,maxPCRace,and maxNPCRace, int merc.h i've defined
them like this:
int maxClass;
int maxRace;
int maxNPCRace;
int maxPCRace;
int maxGroup;
int maxSocial;
/*
* Global variables
*/
extern int maxPCRace;
extern int maxNPCRace;
extern int maxRace;
extern int maxClass;
extern int maxSocial;
extern int maxGroup;
all those other integers work fine and i use the same method to load them
from the file. here's how i get these:
fscanf (fp, "%d %d\n", &maxPCRace, &maxNPCRace);
pc_race_table = malloc (sizeof(struct pc_race_type) * (maxPCRace+1));
race_table = malloc (sizeof(struct race_type) * (maxNPCRace+1));
maxRace = maxPCRace + maxNPCRace;
that works fine too, i log it as they load and it says:
loaded 33 Races, 4 PC, and 29 NPC
so i'm happy with that, however at some point maxRace and maxPCRace get
thrown into nothing, in my raedit_list command im logging it to show me how
many i have and this is what comes up:
MAX_RACE: 0 pc: 12123231 npc: 29
so i cant figure out why 2 would be screwed up whereas 1 would remain fine,
i cant find any spot in the code that would do this either. could anyone
please help me out?