Saving a txt file all screwed up in 1.4 - Bug!
by Warthog · in iTorque 2D · 09/29/2010 (9:40 pm) · 4 replies
Hi all,
In updating our old game written for 1.2, suddenly our save game function isn't working. Still works fine on the Mac, but when saving on the iPhone (iOS4.1) it fails to write most of the file, and other strings are getting the letters XML substituted for what it's supposed to be writing!
Did something with writing files change since 1.2? Or is this a bug?
Thanks!
In updating our old game written for 1.2, suddenly our save game function isn't working. Still works fine on the Mac, but when saving on the iPhone (iOS4.1) it fails to write most of the file, and other strings are getting the letters XML substituted for what it's supposed to be writing!
Did something with writing files change since 1.2? Or is this a bug?
Thanks!
#2
Which has always worked, now it just writes "XML" instead of the name of %currentKey or the contents of %letterMark.imageMap or anything like it used to.
This sucks. I save the entire state of the game including every key on the custom keyboard, everything they've typed, and all notations they've made.
Here's the thing, I can echo out the value of %currentKey.getName() or the others and it shows the value correctly in the echo, but it writes "XML" to the disk.
Can't find a workaround. Among other things I tried:
But it still writes "XML" !
FRUSTRATING DAY!
HELP? PLEASE?
09/30/2010 (1:50 am)
In addition, if I ask it to write a value like this:%file.writeLine(%currentKey.getName()); %file.writeLine(%letterMark.imageMap ); %file.writeLine(%letterMark.displayState );
Which has always worked, now it just writes "XML" instead of the name of %currentKey or the contents of %letterMark.imageMap or anything like it used to.
This sucks. I save the entire state of the game including every key on the custom keyboard, everything they've typed, and all notations they've made.
Here's the thing, I can echo out the value of %currentKey.getName() or the others and it shows the value correctly in the echo, but it writes "XML" to the disk.
Can't find a workaround. Among other things I tried:
%temp = %letterMark.imageMap; %file.writeLine(%temp);
But it still writes "XML" !
FRUSTRATING DAY!
HELP? PLEASE?
#3
10/01/2010 (2:33 pm)
Really? No one has run into this? Michael? LUMA?
#4
http://www.torquepowered.com/community/forums/viewthread/118719
12/02/2010 (3:34 am)
Did you ever get this figured out? I found this thread but am not yet able to look into it myself. http://www.torquepowered.com/community/forums/viewthread/118719
Torque Owner Warthog
Crude Games, LLC
%file.writeLine()
does NOT execute if it is within a FOR loop. Works fine inside a WHILE loop though.