First Level Bug


#1

I came across Code Combat and I thought it was a great idea. Unfortunately, I can’t seem to get past the first level. There are no red dots and Tharin does not move at all. Upon opening the code editor for Tharin, an error pops up. I removed this.moveRight(); and had to click on the x button on the error in order to cast. After casting, the only thing that happens is that the error comes back and Tharin says lead me behind the ogre with your magic. Because I cannot do anything, my time eventually runs out. I hope there is a fix for this.

I’m using a registered Code Combat account and have Windows 7 Home Premium 64 bit and Chrome.

Here is a screenshot:

Here is what my javascript console says:

Registering collection /db/thang.type/names app.js:1556
Linkedin async init success! app.js:485
Generated random seed 0 of type zero from sessionIDs [undefined] VM3144:32
World has been initialized from level loader. app.js:228
JS_WALA couldn't handle 
Object {type: Object}
 
gave error: TypeError: Cannot read property 'children' of undefined aether.js:2341
Odin: Let there be light upon Rescue Mission! (preload: false) app.js:145
Built sheet:  Tree 1                  527ms  Async   app.js:1592
Built sheet:  Shrub 1                 620ms  Async   app.js:1592
Built sheet:  Shrub 2                 299ms  Async   app.js:1592
|Odin's Cyril| Worker initialized after 5586ms app.js:58
Aether Tome worker has finished importing scripts. aether_worker.js:5
|Odin's Ray| Worker initialized after 6098ms app.js:58
Built sheet:  Grass                  1112ms  Async   app.js:1592
|Odin's Cyril| Generated random seed 0 of type zero from sessionIDs ["53c21c035a7a904905ef1a00"] app.js:58
Built sheet:  Well                    126ms  Async   app.js:1592
Built sheet:  House 2                 123ms  Async   app.js:1592
Built sheet:  Ogre Munchkin M         873ms  Async  (Portrait) app.js:1592
|Odin's Cyril|   Loaded 227 of 1800 (+1034ms) app.js:58
|Odin's Cyril|   Loaded 542 of 1800 (+1028ms) app.js:58
Built sheet:  House 1                1438ms  Async   app.js:1592
|Odin's Cyril|   Loaded 945 of 1800 (+1026ms) app.js:58
Built sheet:  Dungeon Wall            971ms  Async   app.js:1592
Built sheet:  Dungeon Floor           168ms  Async   app.js:1592
|Odin's Cyril|   Loaded 1312 of 1800 (+1021ms) app.js:58
|Odin's Cyril|   Loaded 1669 of 1800 (+1024ms) app.js:58
Built sheet:  Ogre Munchkin M        1948ms  Async   app.js:1592
|Odin's Cyril| And it was so: (3.267ms per frame, 1800 frames)
Simulation   : 5881ms 
Serialization: 13ms
Delivery     : 29ms app.js:58
Deserialization: 91ms (0.051ms per frame). 1 batches. app.js:1338
JS_WALA couldn't handle 
Object {type: Object}
 
gave error: TypeError: Cannot read property 'children' of undefined aether.js:2341
Built sheet:  Peasant M              1564ms  Async   app.js:1592
Built sheet:  Goal Trigger            151ms  Async   app.js:1592
Built sheet:  Knight                  499ms  Async  (Portrait) app.js:1592
Built sheet:  Knight                 5499ms  Async   app.js:1592
SuperModel for Level loaded in 19832 ms app.js:212
Built sheet:  Target                   31ms  Sync    app.js:1592
Built sheet:  Selection                25ms  Sync    app.js:1592
Built sheet:  Repair                   29ms  Sync    app.js:1592
Level unveiled after 23.05s app.js:3892
Built sheet:  Wizard                 4767ms  Async   app.js:1592
Built sheet:  Captain                1287ms  Async   app.js:1592
Built sheet:  Highlight                 8ms  Sync    app.js:1592
thang 
e {world: World, spriteName: "Knight", id: "Tharin", trackedPropertiesKeys: Array[16], trackedPropertiesTypes: Array[16]…}
 app.js:3712
|Odin's debugger| JS_WALA couldn't handle 
Object {type: Object}
 
gave error: TypeError: Cannot read property 'children' of undefined app.js:153
|Odin's debugger| Generated random seed 0 of type zero from sessionIDs ["53c21c035a7a904905ef1a00"] app.js:153
|Odin's debugger| JS_WALA couldn't handle 
Object {type: Object}
 
gave error: TypeError: Cannot read property 'children' of undefined app.js:153
JS_WALA couldn't handle aether.js:2341
JS_WALA couldn't handle 
Object {type: Object}
 
gave error: TypeError: Cannot read property 'children' of undefined aether.js:2341
Odin: Let there be light upon Rescue Mission! (preload: false) app.js:145
|Odin's Ray| Generated random seed 0 of type zero from sessionIDs ["53c21c035a7a904905ef1a00"] app.js:58
JS_WALA couldn't handle aether.js:2341
|Odin's Ray|   Loaded 417 of 1800 (+1043ms) app.js:58
|Odin's Ray|   Loaded 974 of 1800 (+1009ms) app.js:58
|Odin's Ray|   Loaded 1443 of 1800 (+1008ms) app.js:58
Deserialization: 92ms (0.051ms per frame). 1 batches. app.js:1338
No frames were changed out of all 1800 app.js:1340
JS_WALA couldn't handle 
Object {type: Object}
 
gave error: TypeError: Cannot read property 'children' of undefined aether.js:2341
|Odin's Ray| And it was so: (2.293ms per frame, 1800 frames)
Simulation   : 4128ms 
Serialization: 12ms
Delivery     : 14ms app.js:58

#2

I can confirm this behaviour. Note that you are using lua (you probably clicked the lua button on the main page). It seems the example code in lua is actually javascript, so the lua parser doesn’t like it. I suppose there may be issues with the languages that are not javascript, as they were added very recently. If you really want to write lua, rewrite all the lines of code in terms of the snippets that you see in the bottom right. That is, replace this.moveDown(); by self:moveDown(); etc. Also remove the comments, as comments in lua have different syntax. So start with

self:moveDown();
self:moveDown();
self:moveRight();
self:moveRight();
self:moveUp();

Hope that helps


#3

Yes, if you aren’t in JavaScript or python most of the default code will be wrong. If you are a Lua, Io, or Clojure programmer, you can help fix the problems by adding default code into each of the levels:


#5

I appreciate both of your responses. Unfortunately, there is still a problem.

It seems as though no matter the language that I choose to play in, the default code is always in
JavaScript and the parser is Lua.

No matter what language I choose, this is the default code:

 // This is your code controlling Tharin!

this.moveDown();
this.moveDown();
this.moveRight();
this.moveRight();
this.moveUp();

// Edit it anywhere you like, add comments like these

// Follow the same "this.action();" format
// Code is case-sensitive.

No matter the language, it seems that Lua is only accepted:

self:moveDown();
self:moveDown();
self:moveRight();
self:moveRight();
self:moveUp();

Does my account need to be reset or something? Everything works perfectly when I’m not logged in.


#6

@kingxerxes I just added sample Lua code for the first level. Try clicking the Restart button at the top to get back to the default code:

Then hit the language logo in the spell palette to change your language for this session to whatever you like:

Working any better?

(I still don’t have Lua sample code written for the rest of the beginner campaign–any help is appreciated!)


#7

@nick Thank you! It is working now!