ERROR: couldn't open .txt


phrase_verbs,goto verb_related_to_weather_fog,485F
31-40 53-62 75-79 92-101 114-118 124-129 136-140 146-151 163-173 185-199 490-492 783-785 1076-2251 2542-2544 2835-3423 3714-5476
ERROR: couldn’t open .txt

Hi all. I’m stuck with my contest entry.

Here’s the last file name in quicktest:

I don’t think that’s the one causing this, but as you can see, I have no line numbers or scene files to work with.

Thanks @Carlos.R and @Lucid, who because they are wonderful have been trying to help. Just throwing this open because I’m getting rather desperate.

Have tried - happy to try again

  • Searching for goto_scene {variables} and rewriting like this:
 *if choice_quicktest
      *set scene_file "chapter_01_the_carpenter__ria"
      *set turn_to "01010100"
    *goto_scene {scene_file} {turn_to}

Example file:

  • Doing the same for *gosub_scene

Likely guilty file, thought was Quicktest proofed (set top and immediately following gosub_scenes):


If we assume that quicktest doesn’t like *goto_scene {scene_file} {turn_to} then you may have to type in an actual scene and label instead of using indirect references.


So, the error is:

ERROR: couldn’t open .txt

That’s [blank].txt.

What I read that as is saying $scene_file (as a variable) is blank when the compiler hits that *goto_scene command.

So I’d look at where/how $scene_file gets set.


Or perhaps a name of a scene is unrecognizable. Are there characters that trip up Quicktest such as underscores?


Apologies, I copy pasted a previous iteration - there are no “” around the chapter titles and scenes (see above). Tell me if that’s not the point you’re making, I’m easily confused!

@Eiwynn When you say underscores trip up quicktest, all my chapter and scene references use underscores:

e.g chapter title: chapter_01_the_carpenter__ria

I wasn’t aware that underscores could be an issue?


Thanks, yes, that’s what @Carlos and @Lucid were saying, I’ve included a scenefile example but will copy a relevant example of what I think you’re saying here:

*label glyf_travelling
*set glyfwalking false

*if choice_quicktest
	*set area_area_code "two_kingdoms"
	*set area_region_code "riverrun"
	*set area_territory_code "waybrook"
	*set region_path "humanism"
	*set glyfwalk_1 "North to Fleece, ${fleece_description}."
	*set glyfwalk_1_territory_destination "territory_two_kingdoms_crownscourt_fleece"


	*if ((storylet_1_present) and ({(((((area_area_code)&"_")&area_region_code)&"_")&area_territory_code)&"_storylet_1_read"} = false)) #${storylet_1_signpost} 
		*gosub_scene {((((("territory_"&area_area_code)&"_")&area_region_code)&"_")&area_territory_code)} {(storylet_variation&"storylet")}
		*set storylet_variation ""
		*goto glyf_travelling

I’ve just included a file up top so people can see how the *goto_scene {variable} commands are proofed against quicktest (so far had only included the *gosub_scene example)


As Jason said, it’s hitting the *goto_scene {scene_file} with a blank scene_file. Make sure to:

  1. *create scene_file with a valid value. (i.e. *create scene_file "startup" is good.) You can then *set it right after all the initiation commands are run.
  2. Use choice_quicktest to set the scene value right before it’s used. (Which you seem to already be doing.)
    Those are the big two ways to fix that problem.


I don’t think it likes indirect references at all. I tried this in a fresh startup.txt:

*title test
*author author

*create scene_file "ch1"
*create turn_to "one"

*if choice_quicktest
 *set scene_file "ch1"
 *set turn_to "one"
 *goto_scene {scene_file} {turn_to}

I also made a ch1 and the appropriate label for it to go to.
When I run it in quicktest, it says:

ERROR: couldn't open ch1.txt

However, when I rewrite the *goto_scene as follows:

*goto_scene ch1 one

It works.


@Carlos.R That is a fairly significant problem for me then. Oh dear.

When you say those are the big ways, is anyone aware of rare quirky ways? I’ll continue to check for an un’ choice_quicktest’ed scene directions, but I’ve done that a few times so I don’t have much hope.

Here is the full Quicktest


Sometimes it’s just rewriting a line. Email me the full file (or point me to where I can download the whole thing) so I can look at it directly: rachel at choice…


The weird thing is that the following works if you play it as a game:

*title test
*author author

*create scene_file "ch1"
*create turn_to "one"

*if not(choice_quicktest)
  #Choice Here
   *set scene_file "ch1"
   *set turn_to "one"
   *goto_scene {scene_file} {turn_to}

I have the ch1 and label, and it goes to the label, and subsequently, to the *ending in the other scene.


That error still makes me think the reference variable is empty since it says couldn’t open .txt

Same thing happens with this:

*temp scene_file “”
*goto_scene {scene_file}


I know! That’s why I was thinking this necessitated a Quicktest orientated solution/workaround.

I can pm a google drive link to the full mygame zip if thats helpful


Quick post
True error is: operation_glyf_travelling line 63: File does not exist: .txt


I’ll take a link to that, if you like. :slight_smile:

My suspicion is the files with glyfwalk_1_territory_destination

There are 6 of them and if any were left blank, you’d have that error.


Just a sec - Rachel may have sorted…


Check your email.


I have another error! Thank you so much @RETowers @Carlos.R @Lucid and @jasonstevanhill and @Eiwynn


What’s the error…?


Ooh sorry @Carlos.R , didn’t see this : ) I takes 10 mins now per quicktest, so for me I’ve only tried 4 different things!

Similar direction issue.

Original Bug

*label dust_weather_noun_singular

*set random_noun "dust"
*gosub_scene phrase_adjectives weather[random_noun]

Testing Now

*label dust_weather_noun_singular

*set random_noun "dust"
*set {weather_noun_goto} (("weather"&"_")&random_noun)
*gosub_scene phrase_adjectives {weather_noun_goto}