Mailing List
Home
Forum Home
Mac Game - Mac game development
Rivers of MUD - a Diku and Merc based multiuser dungeon
SMAUG
Subjects
Getting UDP through NAT/firewalls/whatever for a game
Getting UDP through NAT/firewalls/whatever for a game
QuickTime errors
Python script as stand alone MUD server
Various sound problems
Fragment Shaders & GL TEXTURE RECTANGLE EXT
Timers and global variables
Re: Language and platform for Text MUD server
Apparent acquisition of Yantis (mysupersales) by IDE
HID keyboard
Getting UDP through NAT/firewalls/whatever for a game
Microsoft Sparkle
Director MX
Congratulations Horizons
Yet more problems fullscreen mode
Apple Dev Kitchen Them 's tasty vittles, Maw!
NSOpenGLContext, Pbuffers, and drawables
More DCR "theft " naughtiness
dynamic sprite creation and imaging lingo
Re: Find stuff in Flash array?
Effects of skill imbalances?
QuickTime errors
Rom 2 4/Quickmud Enhancement/Bug fix
Working with XML files/CFURL
smooth scrolling/subpixel tweening
RE: (Ron help me?) Flash text
Flash Racing
MudDev FAQ 2
Browser based games
Installing GLUT
Special character in Flash XML
 
My external int doesnt want to work...

My external int doesnt want to work...

2005-01-26       - By Tristan M

 Back
Reply:     1     2     3  

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?


--
ROM mailing list
ROM@(protected)
http://www.rom.org/cgi-bin/mailman/listinfo/rom