Posted: 31st Oct 2011 17:13
following is my code
+ Code Snippet
// load best score
	char* szFile = agk::GetWritePath();
	
	char fileName[256];
	strcpy(fileName, szFile);
	strcat(fileName, "save.txt");
	delete szFile;
	
	int iFileID = agk::OpenToRead(fileName);
	
	m_iBestScore = agk::ReadInteger(iFileID);
	
	agk::CloseFile(iFileID);


what is the problem?
Posted: 31st Oct 2011 17:27
GetWritePath() only tells you were the file will be saved, you shouldn't include it in the path passed to OpenToRead() or OpenToWrite()
Posted: 31st Oct 2011 17:29
Thank you. I modified my code as following .now it works.
+ Code Snippet
	int iFileID = agk::OpenToRead("Score.txt");
	
	m_iBestScore = agk::ReadInteger(iFileID);
	
	agk::CloseFile(iFileID);