Original Post
Hmm, I think I''m doing this incredibly wrong, but if anyone can look over my code, I''d be much obliged.
bool LoadMap(void)
{
struct tile {
int ID[10];
int Special;
} Tile;
int i;
int Building;
int LocX;
int LocZ;
int Models[7];
int x = 0;
char path[6] = ".msd3";
FILE *mapFile;
mapFile = fopen("map.txt", "r");
while (fscanf(mapFile, "%d", &i) != EOF) {
Tile.ID[x] = i;
x++;
}
for (x = 0; x < 7; x++) {
Building = Tile.ID[x];
char BuildingID = static_cast(Tile.ID[x]);
LocX = Tile.ID[x+1];
LocZ = Tile.ID[x+2];
MS3D Building;
Building.Load(BuildingID);
x += 2;
}
return true;
}
Basically, I''m opening a file, parsing each 3 lines into specific variables, and loading a Milkshape model. However, I keep getting asked to use a pointer as my filename (BuildingID). Whenever I do, I get an Assert failure in Valid_Block_Type_Header. What am I doing wrong?!