fgets(string,100,FP);
Output(string);
if(stricmp(string,"QuadTree map file V1.0\n")!=0)
{
Output("Terrain::LoadFromFile : Incorrect file format\n");
return -2;
}
The log file is...
QuadTree map file V1.0
Terrain::LoadFromFile : Wrong file structure
So what''s up? I tried the test string with and without the \n, and tried stricmp, even strncmp on the first two characters didn''t work. I can SEE the string is read properly! This is really annoying me
Read about my game, project #1
John 3:16
WTF is wrong with strcmp? URGENT!
Here is the start of my map file:
QuadTree map file V1.0
Ambient=0.400000 0.400000 0.400000
Diffuse=0.600000 0.600000 0.600000
And my loader code:
uhm... maybe you should show us the code where you actually print the error message.
"Terrain::LoadFromFile : Wrong file structure"
"Terrain::LoadFromFile : Wrong file structure"
Sorry everyone, I didn''t notice when the error changed from wrong file format to wrong structure. The hardest errors to fix are the stupidest ones eh
Thanks for the help though guys, sorted now.
Read about my game, project #1
John 3:16
Thanks for the help though guys, sorted now.
Read about my game, project #1
John 3:16
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement