How do I fix "cr_createRuntime is not defined"?

Get help using Construct 2

Post » Sat Dec 31, 2016 11:12 pm

*UPDATE: After days of work and probably around 20hrs of total work, I finally figured out it was Spriter's fault the entire time. It took me so long because I didn't suspect it as the cause. When I delete all SCML objects, it works, both in simulate and build. No runtime error, no black screen. Spriter just recently released version 10, an update I accepted, after which I also immediately looked for and installed the latest Spriter plugin for C2 as well, something I always do after every Spriter update, since it doesn't appear to be done automatically. So there's needless to say a high chance that there's a major bug either in Spriter version 10 or its C2 plugin. I'll look into it further tomorrow and then alert Spriter to it. ...Finally!

I get that error in Intel XDK's Simulation and my game doesn't run, just a black screen.

Uncaught ReferenceError: cr_createRuntime is not defined index.html
Code: Select all
    <script>
      document.addEventListener("deviceready", function ()
      {
         window["c2iscordova"] = true;
         
         // Create new runtime using the c2canvas
         cr_createRuntime("c2canvas");
         
         document.addEventListener("pause", function() {
            cr_setSuspended(true);
         }, false);

Searching for the error in the forums and online, some people found that rolling back to an older C2 version (I use the latest beta r241) avoided the error, but I'm stuck on r241 because the project was saved there. I'll never trust beta releases again, and set update notifications in options to be stable releases only, so I'm never stuck like this again. But, for now, can this error be fixed in r241? (or in r242)
Last edited by Team EternaL on Sun Jan 01, 2017 8:45 pm, edited 1 time in total.
B
13
S
5
G
1
Posts: 54
Reputation: 1,551

Post » Sun Jan 01, 2017 9:27 am

@Ashley Or even just what does the error mean? I've been at this error for days now, and am confused about what to do or even if I should do anything other than just be patient and wait for Scirra to fix it, (in which case I'm at least trying to make it clear that the error exists, which hopefully I have) because I don't even know how much of this error is my fault, or how much is C2's fault (such as from the latest r241, if applicable?). Perhaps my main question is: How do you define the cr_createRuntime?
B
13
S
5
G
1
Posts: 54
Reputation: 1,551

Post » Sun Jan 01, 2017 3:45 pm

I've been trying to find a solution for some days, and i didn't xDD The projects are working correctly after the build so i think it's a problem with xdk emulator :(
B
19
S
6
G
2
Posts: 258
Reputation: 2,644

Post » Sun Jan 01, 2017 4:27 pm

Josek5494 wrote:I've been trying to find a solution for some days, and i didn't xDD The projects are working correctly after the build so i think it's a problem with xdk emulator :(

Hmm my builds don't work, so my issue may be deeper. In my case it seems that when the runtime error happens in the simulation, it also means a black screen on-device.
B
13
S
5
G
1
Posts: 54
Reputation: 1,551

Post » Sun Jan 01, 2017 5:23 pm

There's an script line including your c2runtime.js in your index.html?
B
19
S
6
G
2
Posts: 258
Reputation: 2,644

Post » Sun Jan 01, 2017 8:45 pm

Josek5494 wrote:There's an script line including your c2runtime.js in your index.html?

*UPDATE: After days of work and probably around 20hrs of total work, I finally figured out it was Spriter's fault the entire time. It took me so long because I didn't suspect it as the cause. When I delete all SCML objects, it works, both in simulate and build. No runtime error, no black screen. Spriter just recently released version 10, an update I accepted, after which I also immediately looked for and installed the latest Spriter plugin for C2 as well, something I always do after every Spriter update, since it doesn't appear to be done automatically. So there's needless to say a high chance that there's a major bug either in Spriter version 10 or its C2 plugin. I'll look into it further tomorrow and then alert Spriter to it. ...Finally!
Thanks for your replies Josek!
B
13
S
5
G
1
Posts: 54
Reputation: 1,551

Post » Mon Jan 02, 2017 1:51 pm

Team EternaL wrote:
Josek5494 wrote:There's an script line including your c2runtime.js in your index.html?

*UPDATE: After days of work and probably around 20hrs of total work, I finally figured out it was Spriter's fault the entire time. It took me so long because I didn't suspect it as the cause. When I delete all SCML objects, it works, both in simulate and build. No runtime error, no black screen. Spriter just recently released version 10, an update I accepted, after which I also immediately looked for and installed the latest Spriter plugin for C2 as well, something I always do after every Spriter update, since it doesn't appear to be done automatically. So there's needless to say a high chance that there's a major bug either in Spriter version 10 or its C2 plugin. I'll look into it further tomorrow and then alert Spriter to it. ...Finally!
Thanks for your replies Josek!


Nice!! ^^
B
19
S
6
G
2
Posts: 258
Reputation: 2,644


Return to How do I....?

Who is online

Users browsing this forum: AndreasR, tarek2 and 12 guests