"cr_" instead of "cr." in index.html breaks export

  • I include a solution

    Link to .capx file (required!):

    apagada.com/varios/jigsawpuzzle/puzzle_approach_3.capx

    (any other capx would work)

    Steps to reproduce:

    1. export file. Minified or unminified script.

    2. try to run it

    Observed result:

    black screen in browser it does not run. "cr_createruntime" not found

    Solution:

    Manually search and replace "cr_" for "cr." in index.html.

    Expected result:

    Browsers affected:

    ALL

    Operating system & service pack:

    Construct 2 version:

        r126

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Please notice this applies to Chrome export also, and maybe to other exporters (I've tried node export and that does not work for me, but I can't see debug messages).

  • Can't reproduce, every project works fine for me. cr_createRuntime is defined in c2runtime.js so no change is necessary. Please read the bug submission guidelines (don't submit .capx files using third party plugins - yours uses Canvas)

  • OK, I've searched again my sources and I found a definition of window["cr_getC2runtime"]. I guess something in the plugin stop that line from being interpreted. I wonder why the substitution of cr_ for cr. in the source made my project work, not only as standard html5 but as chrome extension, too.

    I have checked with another project I had exported in the past and it seems to work with just 4 typeset exceptions, so the wrong part should be in the plugin. In the new project, I see no functions defined as "cr.getC2runtime", so I guess they do nothing and return null. How could my hand-edited project work?

    I used many nested "Pick all" conditions. Could it mix something?

    Just in case you want to compare how they run, here they are:

    1) my "Jigsaw Puzzle", as originally compiled: http://www.apagada.com/varios/jigsawpuzzle/index2.html

    2) my "Jigsaw Puzzle", cr_ substituted by cr. http://www.apagada.com/varios/jigsawpuzzle/index.html

    I just tested both and now both of them run. I wonder how or why.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)