• Popular Now

• 12
• 27
• 9
• 9
• 20

Archived

This topic is now archived and is closed to further replies.

WTF is wrong with strcmp? URGENT!

This topic is 5713 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

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:
	fgets(string,100,FP);
Output(string);
{
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
John 3:16

Share on other sites
Drop the "!=0" in the if() and try that...

CEO Platoon Studios

Share on other sites
uhm... maybe you should show us the code where you actually print the error message.

Share on other sites
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.