Mail Archives: djgpp/1998/01/29/01:18:35
Leave it to me to run into more problems :) First problem, is when I
try and substitute a datafile object with a variable. Example:
draw_sprite(screen,datafile[spritename].dat,16,16);
spritename is a char with a 20 character array, containing "BLANK". I
get this error when compiling:
Error: array subscript is not an integer
Second problem: having 2 datafiles opened at the same time. Having a
datafile already opened seems to cause the second one to return 1. My
two DATAFILE declarations are different. My code to open the second
datafile is below:
{
strcpy(get_filename(buf), "c:/maped/testspr.dat");
user_datafile = load_datafile(buf);
if (!user_datafile) {
allegro_exit();
printf("Error loading TESTSPR.DAT!\n\n");
return 1;
}
}
I *believe* that the problem is due to there already being a datafile
open, but am not positive. The datafile is not corrupt, and it's header
is correct and in-place.
Any help on either of these would be greatly appreciated; thanks!
____________________________
Matt Riker
SPAMGUARDriker AT pipcom DOT com
*** Remove SPAMGUARD ***
*** when replying! ***
- Raw text -