menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

WarriorJS

An exciting game of programming and Artificial Intelligence

Channels
Team

Help!!! Web version goes blank

October 10, 2018 at 10:28pm

Help!!! Web version goes blank

October 10, 2018 at 10:28pm
Hi! I've been playing this from my browser (Firefox) during my off times and is great.
I've managed to complete all initial 9 levels, and even the Epic mode.
However, given that I ended up pretty low on the leaderboard (I know that my code was far from good) I started refactoring and improving the decision-making, so far with bad results, but still having fun and learning.
The last couple of days I started having a major issue when reaching the stairs in Baby-Steps (Epic mode) Level 5; the game just goes blank and nothing else happens until I hit CTRL+F5 to refresh the page (luckily the code gets saved ;)).
Any ideas? There is a video showing the issue https://youtu.be/vy2zKqkiXYk
Thanks in advance!!!

October 10, 2018 at 11:46pm
I have the same issue on Chrome, except it happens on level 3.
I noticed that if I complete the level without attacking (only shooting) it crashes, but if I update my code to attack, I can make it through the level fine. Looks like it could be a similar thing.
The following stack trace is logged on crash:
react-dom.production.min.js:3746 TypeError: Cannot read property 'floorMap' of undefined
at n.value (PlayLog.js:166)
at Zo (react-dom.production.min.js:3359)
at Xo (react-dom.production.min.js:3350)
at react-dom.production.min.js:3509
at Ri (react-dom.production.min.js:4488)
at ji (react-dom.production.min.js:4507)
at da (react-dom.production.min.js:4828)
at pa (react-dom.production.min.js:4802)
at Mi (react-dom.production.min.js:4683)
at Object.enqueueSetState (react-dom.production.min.js:2798)
Can you check if a similar error is logged to your console on crash?
Should be able to open the console on Firefox with Ctrl+Shift+J
Hey , I don't see any of those on the Ctrl+Shift+J console; I completed previous level with only attacking too.
, I opened the other console (F12) and I found a similar error:
TypeError: i is undefined
[Learn More]
PlayLog.js:166:12
value
PlayLog.js:166:12
Zo
react-dom.production.min.js:3359
Xo
react-dom.production.min.js:3350
Ri/t<
react-dom.production.min.js:3509
Ri
react-dom.production.min.js:3459
ji
react-dom.production.min.js:4507
da
react-dom.production.min.js:4828
pa
react-dom.production.min.js:4802
Mi
react-dom.production.min.js:4683
enqueueSetState
react-dom.production.min.js:2798
b.prototype.setState
react.production.min.js:73
n/t.goToNextLevel
WarriorPage.js:76:4
n/t.handlePlaybackEnd
Play.js:60:6
n/t.tick
PlayLog.js:131:6
TypeError
columnNumber: 8271
lineNumber: 1
message: "i is undefined"
stack: "[email protected]https://warriorjs.com/static/js/play.528f91dc.chunk.js:1:8271\[email protected]://warriorjs.com/static/js/66.e60071a1.chunk.js:1:385927\[email protected]://warriorjs.com/static/js/66.e60071a1.chunk.js:1:385770\nRi/t<://warriorjs.com/static/js/66.e60071a1.chunk.js:1:399654\[email protected]://warriorjs.com/static/js/66.e60071a1.chunk.js:1:399134\[email protected]://warriorjs.com/static/js/66.e60071a1.chunk.js:1:402798\[email protected]://warriorjs.com/static/js/66.e60071a1.chunk.js:1:407470\[email protected]://warriorjs.com/static/js/66.e60071a1.chunk.js:1:407124\[email protected]://warriorjs.com/static/js/66.e60071a1.chunk.js:1:405636\[email protected]://warriorjs.com/static/js/66.e60071a1.chunk.js:1:374506\[email protected]://warriorjs.com/static/js/66.e60071a1.chunk.js:1:323814\nn/[email protected]://warriorjs.com/static/js/warrior-page.ec9afecf.chunk.js:1:8227\nn/[email protected]://warriorjs.com/static/js/play.528f91dc.chunk.js:1:16468\nn/[email protected]://warriorjs.com/static/js/play.528f91dc.chunk.js:1:7131\n"
And, sadly, when I log into Chrome with the same account; the warrior caanot be loaded, I have a:
Oops!
We can't seem to find the page you're looking for.
warrior.goHome()
warrior.goMeetOtherWarriors()

October 11, 2018 at 1:33pm
Whoops, gave you the wrong shortcut, my bad!
Worth mentioning that in trying to reproduce it with minimal code I found that my shoot() vs attack() theory was a red herring.