Failing to write / read file

Posted By: capanno

Failing to write / read file - 06/29/09 07:42

This is the first time Im hearing of this error. As the player progresses through the game, the progress is saved in a text file. A client contacted me saying that every time they start the game reads that no progress has been made. What can be the cause of this?

------------------
System Information
------------------
Time of this report: 6/26/2009, 12:45:16
Machine name: AN028339
Operating System: Windows XP Professional (5.1, Build 2600) Service Pack 2 (2600.xpsp_sp2_gdr.050301-1519)
Language: English (Regional Setting: English)
System Manufacturer: IBM
System Model: 2889CG7
BIOS: Phoenix FirstBIOS(tm) Notebook Pro Version 2.0 for IBM ThinkPad
Processor: Intel(R) Pentium(R) M processor 1.70GHz
Memory: 502MB RAM
Page File: 512MB used, 716MB available
Windows Dir: C:\WINDOWS
DirectX Version: DirectX 9.0c (4.09.0000.0904)
DX Setup Parameters: Not found
DxDiag Version: 5.03.2600.2180 32bit Unicode
Posted By: jcl

Re: Failing to write / read file - 06/29/09 12:40

Several. My first guess is that you've created that file somewhere in the program folder, and under Vista a user without administration rights has no write access to that folder.
Posted By: capanno

Re: Failing to write / read file - 06/29/09 13:04

I see. Well the user is using windows XP, and the file is already there, its not created by the game.
Posted By: jcl

Re: Failing to write / read file - 06/30/09 07:44

This can also happen under XP. Better don't write into the program folder, no matter with which OS.

Of course it can also have other reasons.
Posted By: capanno

Re: Failing to write / read file - 06/30/09 09:39

So what should my first step be? Find out if the user has admin rights?
Posted By: jcl

Re: Failing to write / read file - 06/30/09 14:24

The first step is improving your program so that it checks what went wrong. When you open and write into a file, check the return values in case the file could not be accessed. You can also read back what you've written, and compare.

When it is confirmed that the user can not write into the file, let him do some simple tests, f.i. writing with Notepad in a file in the same folder. If that also fails, it's an access right problem. Otherwise, it's some other bug in your script.
Posted By: capanno

Re: Failing to write / read file - 07/07/09 09:57

Its definitely not a bug in the script. Ive sold over 1000 copies of the game and its the first time this is reported.

Im going to try the write in notepad in the same folder idea.
© 2024 lite-C Forums