Game Development Community

Failed to write files

by Pier Paolo Guillen Hernadez · in Torque Game Builder · 09/13/2007 (7:47 pm) · 3 replies

Hi!

I'm doing a little project which is my first one in TGB, and I'm having some problems. The first one is that I want to have a high-scores table. This is quite important for the game, as it's based purely on the ability of getting a good score.

I downloaded a tutorial from this site and copied the code. I modified it a bit and after using it for a while, I couldn't get it to save the info to a file. As the only part of the code that is not explained on the tutorial is the one related to saving/loading, I decided to try a different approach. I remembered there is an I/O tutorial in the help file, and I tried to use that as a base.

For some reason, it just didn't work. I tried saving it to different locations without success. I also tried creating first the file and the using it, but also failed. I don't have complete version, so I don't have access to the code, but my guess is that this functions must be somewhat similar to using fopen with "wt" in C, so I don't get it why it doesn't work. I think the load function doesn't work as well, but I really can't recall if I tested it or not (I'll try to do it soon and post the result).

By the way, I checked the log and it seems that some files used by TGB aren't getting saved either. I had noted that earlier but hadn't give it any importance. I get the following errors:
"XML::beginWrite - Failed to write to filecommon/commonConfig.xml."
"saveGameConfigurationData - Failed to write to file: common/commonConfig.xml"

Any idea on how to fix this?


Thanks for your help!

Pier

PS: I didn't included the code, as it's the same as the one in the I/O tutorial, but I'll can post it if needed.

#1
09/14/2007 (7:32 am)
There are a truckload of error reports about this here in the forums. There are a number of threads with various solutions posted -- here's the one that worked for me.

--clint
#2
09/19/2007 (9:48 pm)
It has been fixed for the next version of TGB as well... clint directs you to a good work around for now :)
#3
09/23/2007 (3:42 pm)
Need... forum... search... quick...