Javascript error on startup

Discussion and feedback on Construct 2

Post » Fri Sep 11, 2015 1:49 am

I've a perplexing problem! It began just tonight, when I downloaded r213.

When I run my game locally (preview mode), it works just fine, but...

1) The minification process no longer works. It warns me about needing 64-bit Java, but I know I already have 64-bit Java installed.
2) When I try to start the game in Chrome (from my server), I get a console error saying "Uncaught SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode". I looked at the source, and sure enough, the script had a let expression with no mention of "use strict".

Why is this happening? The live copy of my game is currently unplayable (black screen - not even a loading bar)! Help!
B
10
S
2
Posts: 104
Reputation: 1,140

Post » Fri Sep 11, 2015 7:08 am

r213 is a beta, and as such, can come with problems, some of which have already been posted in the bug section (and some sound similar to your problems). Beta's are used at users own risk.

My advice, go back to r212.2 if you really need stability, especially now that Ashley has far less time now that he is an active development of C3 as well as keeping C2 going. It could be weeks for a fix to come out for r213.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
86
Posts: 5,482
Reputation: 59,750

Post » Fri Sep 11, 2015 12:21 pm

That makes sense, but unfortunately now it's been saved in 213, I can't open my project again in 212.2. To make things worse, after I upgraded my computer I apparently forgot to enable backups on this one, so I can't even go back to my last save in 212.2. Is there anything else I can do (potentially even editing the version number in the XML)?
B
10
S
2
Posts: 104
Reputation: 1,140

Post » Fri Sep 11, 2015 12:36 pm

edit the caproj file with editor, the part you are looking for is:
<saved-with-version>18800</saved-with-version>
B
38
S
11
G
5
Posts: 485
Reputation: 5,340

Post » Fri Sep 11, 2015 12:52 pm

Sigh, yeah, I downloaded it as I was finishing my game for the underground jam-- well doesn't look like the game is loading :/
Tell if you can play my game plz--
https://www.scirra.com/arcade/undergrou ... tters-2351

I also found this great news about Chrome and no longer supporting
Java
https://java.com/en/download/faq/chrome.xml
B
16
S
6
G
2
Posts: 165
Reputation: 3,209

Post » Fri Sep 11, 2015 9:50 pm

@BurningWood: Yep, your game doesn't play either.
@fldr: That fixed it! Thanks!
B
10
S
2
Posts: 104
Reputation: 1,140

Post » Sat Sep 12, 2015 10:39 am

@MoscoeModder
Thanks for checking--
Also, I'm re-downloading r212-2 from the Scirra. How did you revert the file? And did you open it in r212-2?

@fldr
I found this <saved-with-version>21300</saved-with-version> what's the next step?
B
16
S
6
G
2
Posts: 165
Reputation: 3,209

Post » Sat Sep 12, 2015 10:52 am

@MoscoeModder and @fldr figured it out, my games live, thanks.
B
16
S
6
G
2
Posts: 165
Reputation: 3,209

Post » Sun Sep 13, 2015 4:32 pm

BurningWood wrote:I also found this great news about Chrome and no longer supporting
Java
https://java.com/en/download/faq/chrome.xml


Actually, C2 games don't require any plugins to work (no flash, no vlc, no nothing, that is also true for java, the java plugin is not needed, and AFAIK never was), as they use only javascript (which is totally, completely unrelated to java. I know, the names seems to fit just perfectly and that would imply they are directly related but no, it is just that the names look the same.), however java is required to run the minifier, but that is, again, not related to running the final game, it is just that C2 needs to run a specific java file on export if minification is enabled, and java is not required for the actual person that will run your game.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Mon Sep 14, 2015 2:47 pm

@Aphrodite Thanks for clearing that up. After the whole UNITY not working on the web on Chrome, I was afraid something like this may happen to C2.
B
16
S
6
G
2
Posts: 165
Reputation: 3,209

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 3 guests