Problems with writing files and unstable data.

Hello all,

I am trying to write files, and I am having a heck of a time with it. In particular, I am trying to have the program automatically generate a playlog, to help me with bug testing (I can have testers just send me the log so I can recreate instead of forcing them to describe the problem). However, whenever I try to write to the file, it always fails. I basically just copied it out of one of the examples, so I don’t understand what is going wrong. Any advice would be appreciated. (In Inform 7)

The idea was that, every turn, the location of the player and the player’s command would be stored in a table, and when the player quits, it writes to a file. But every time I try, it fails with unstable data. I am guessing that is because I am trying to store the room name as indexed text, but if so, not sure how to fix it.

[code]After reading a command:
let T be indexed text;
let T be the player’s command;
choose a blank row in the table of commands;
change the room entry to the printed name of the location of the player;
change the Command entry to T;

Check quitting the game:
write File of Commands from the Table of Commands.

The File of Commands is called “textlog”.

Table of Commands
Room Command
indexed text indexed text
with 200 blank rows.
[/code]

I ran your code and got this textlog

* //24144B89-EE8A-47B7-A868-7449A2A4067B// textlog
! Table of Commands (5)
S70,105,108,101,115,0; S105,0; 
S70,105,108,101,115,0; S108,111,111,107,0; 
S70,105,108,101,115,0; S122,0; 
S70,105,108,101,115,0; S115,105,110,103,0; 
S70,105,108,101,115,0; S113,117,105,116,0; 

So there appears to be some other problem. What commands are you trying?

Erm, why not just have your testers type ‘script’ at the first prompt? This will save a complete play script as a text file.

I don’t know whether this works with online play, but you don’t need online play for testing…

–JA

For diagnosing this problem, you should note which OS and interpreter version you’re using.

However, it’s also true that getting complete transcripts is easier and more reliable.

Just simple stuff. Moving around in directions, looking at things.

I am just using the default Inform 7 interpreter, for the most part, in Windows XP. I tried releasing it and using glulxe, same problems. Tried “Script”, didn’t work. I would rather do something automatic anyway, to make it easier for other people.

Even if I can get script to work, I still have to figure out how to write files for other reasons, as I want to have a preferences file and an ending scoreboard.

The SCRIPT command does not work from within the interpreter that ships with the IDE. It should work from the released game file, though.

Also, you can trigger a transcript semi-automatically by adding a line like:

When play begins, try switching the story transcript on.
This won’t work from within the IDE either; but it, too, should work from the released version of the game.

I was using the same setup. Did you post your entire source or just a snippet in the OP?

If you have access to a LAMP server, you can have testers play online and keep complete transcripts on the server, using Juhana’s fantastic Parchment-Transcript. I’ve been using it with my WIP and I’m really happy with it.

It looks like it’s changed somewhat since I installed it - I followed links to this github repository:

github.com/juhana/if-recorder

Capmikee,

Thank you! That was EXACTLY what I was looking for.