Compile Error: "Export Failed"

I’m having trouble with compiling the latest version of my project. I’ve successfully compiled the project before but that was back in 2017.

The error I’m getting is when I try to run the compiler, Firefox tells me:

EXPORT FAILED
Error: Could not open web/mygame/index.html

Everything seems to work fine locally (the files all exist, the game works, etc.), so I’m not sure what I may be doing wrong. Any help would be appreciated.

Welcome to the COG community! :slight_smile:

Are you using the most recent version of Choicescript? If you’re still using a version from 2017, then you’re probably going to run into tons of errors. There’s also been a lot of errors with Firefox recently - have you tried running the compiler in a different browser?

2 Likes

Thanks for responding! I didn’t have success using Chrome or Explorer/Edge either, so perhaps it is the old version of the compiler. If you can point me to the new version I’d love to give that a try :slight_smile:

1 Like

The latest version is always on GitHub.

1 Like

I’m running into this issue, too: this is my first time trying to compile my game, so I might be doing something wrong!

I followed @cup_half_empty’s instructions here.

  • I downloaded the most recent version of ChoiceScript.
  • I edited my style.css stylesheet and saved it.
  • Using CSIDE, I exported my files to my /web/mygame/scenes folder, ensuring it was empty of other files first.
  • I downloaded Firefox and set html files to be automatically opened by Firefox.
  • I ran the compile.html file in my root folder, and it keeps popping up this error:

EXPORT FAILED
Error: Could not open web/mygame/index.html

Does anyone know what could be causing this or how to fix it? :slight_smile:

2 Likes

Does exporting a compilation from within CSIDE work? I appreciate you can’t use a custom stylesheet (yet), just trying to eliminate problem spaces.

But my assumption is that you’ve just not got the paths quite right somewhere.

EDIT: Actually is this all to do with the fact you need to “upload” files now? For compile.html you need to upload your whole CS folder (i.e. choicescript-master).

1 Like

Oh, I got it to work! I think what happened was that I extracted the files in such a way that there were two “choicescript-master” files nested on top of each other, if that makes any sense! (How does one compile from CSIDE, though?)

1 Like

Right-click a project, go to export, then ‘compiled game’:
image

Not currently available on the web version though.

1 Like

Oh, thank you! :sob: I’ve been using CSIDE for three years now and I’m still learning things about it haha!

1 Like

More info available in the help tab at: Home > Basic Topics > Publishing and Exporting

2 Likes

I’ve been trying to learn how to use CSIDE over the last couple of days and i’m confused when i get and error for gender choice, and choices in particular. I would really appreciate some help since this is the 1st time i’m doing this.

It sounds like you’d benefit from posting about your specific issues in the “ultimate noob coding question thread” or searching for topics relating to the specific errors you get, @Xiomy_Gomez. The more specific you are about what you’re doing, what errors and messages you’re seeing, or what you’re confused by, the more likely someone will have a solution for you!

2 Likes

Thank you! I’ll try that.

1 Like