CPP Levels Bug Reports

Continuing the discussion from CPP Levels Bug Reports:

Level Name: Swift dagger
In-game username-johnyjohnm
Description of bug: Asking for ; for hero.throw(enemy);


I don’t know how to bring up console. so i can’t give anything for it.

1 Like

**Level Name:Play grove
**In-game username:Voddy_UA
Description of the bug: am learning C ++ and for the first time I get an error that I cannot use parentheses () and the = sign. Accordingly, I can not pass the level (
Screenshot of Error:

Bug in Mages Might for CPP in hero.chooseItem. 2 bugs actually. The first is that the auto populated code doesn’t add in the semicolon at the end. The second is that even if you do add it, the game says it is missing from the initial line. The initially populated code has this issue and I tried to rewrite the code manually to match the example in the method and ended up with the same issue as well. As an aside, not sure if it was intentional but, in the initial code the indenting is off. Screenshots show after I changed the indenting.
Issue # 1 - missing semicolon

Issue # 2 - even with the semicolon the games states there is none and basically freezes the code at this point.

Welcome to the forum! This is a family-friendly place where coders can share bugs, ask for help on any CodeCombat level (don’t forget to post your code correctly), or just hang out with other coders. But before you proceed, please check out our guidelines: this topic.
Have a great time! :partying_face:

**Level Name - Backwoods Forest - Swift Dagger
**In-game Username: CalLib1223
Description of Bug: like my issue above, in CPP it is not recognizing the semicolon at the end of the line.

***Edit looking in other levels such as Shrapnel in Backwoods Forest I believe the issue is with hero.throw(). If I change hero.throw() to hero.attack() it works just fine.

1 Like

I managed to reproduce the bug.

// Use your bow at long range and dagger at short range.

int main() {
    while(true) {
        auto enemy = hero.findNearestEnemy();
        if (enemy) {
            float distance = hero.distanceTo(enemy);
            if (distance < hero.throwRange) {
                hero.throw(enemy);
            }
            else {
                // Attack the enemy with your bow.
                hero.attack(enemy);
                
            }
        }
    }
    return 0;
}

GameDev 2 - Guard Duty
Snake2109

There is a code Error right of the bat in the code when starting the level

Missing Quotes - try “mountain shrub”

Screenshot is unedited level.

Here is the Code, soldier.moveXY(42, 48); soldier.attack(enemy); is my added code.

// Add a soldier to the level to prevent ogres from crossing the path.
// Command the soldier using an event handler function.

// This assigns your spawned unit to the soldier variable.
auto soldier = game.spawnXY("soldier", 42, 48);
void soldierLogic() {
    // Fill in the code for the soldier's actions here.
    // Remember to use 'soldier' instead of 'hero'!
    while(true) {
        auto enemy = soldier.findNearestEnemy();
        // Attack the enemy, if the enemy exists.
        if (enemy) {
            // Units have the attack() method.
            // Use soldier.attack(enemy) method:
            soldier.attack(enemy);
        }
        // Else, move back to the starting position.
        else {
            // Units have the moveXY() method.
            soldier.moveXY(42, 48);
        }
    }
    
}

// This says to run the soldierLogic function when the soldier is spawned.
soldier.on("spawn", soldierLogic);

Sorry i don’t have the logs that show anything…

Level Name: Safety Blanket
In-game username: Witalis
Description of the bug: Code can’t run.
Code:

int main() {
    // This is an array of nearby names!
    // Enemies are at the 0, 2, 4, and 6 indexes of the array.
    auto names = {
        "Thabt", "Victor", // 0, 1
        "Leerer", "Alianor", // 2, 3
        "Gorylo", "Millicent", // 4, 5
        "Weeb", "Brom" // 6, 7
    };
    
    // Attack the first two ogres at indexes 0 and 4.
    hero.attack(names[0]);
    hero.attack(names[4]);
    // Attack the ogre at index 2:
    hero.attack(names[2]);
    // Attack the ogre at index 6:
    hero.attack(names[6]);
    return 0;
}

Console Logs of Error:

This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. safety-blanket
Some cookies are misusing the recommended “SameSite“ attribute 6
Loading failed for the <script> with source “https://connect.facebook.net/en_US/fbevents.js”. safety-blanket:1:1
Failure loading StripeCheckout API, returning empty object. stripe.coffee:12:10
PlayLevelView: Create LevelLoader PlayLevelView.coffee:191:12
Populated defaults for Level Safety Blanket in 17ms CocoModel.coffee:110:12
LevelLoader: loading session: 
Object { cid: "c16", attributes: {…}, _changing: false, _previousAttributes: {…}, changed: {}, _pending: false, _events: {…}, saveBackup: K(), usesVersions: false, url: r()
, … }
LevelLoader.coffee:200:14
LevelLoader: Reason not loaded: worldNecessities still loading 44 LevelLoader.coffee:456:12
Loading dependencies for session:  
Object { cid: "c16", attributes: {…}, _changing: false, _previousAttributes: {…}, changed: {}, _pending: false, _events: {…}, saveBackup: K(), usesVersions: false, url: r()
, … }
LevelLoader.coffee:248:12
LevelLoader: Reason not loaded: worldNecessities still loading 67 LevelLoader.coffee:456:12
World necessities loaded. LevelLoader.coffee:471:12
World has been initialized from level loader. LevelLoader.coffee:619:12
PlayLevelView: world necessities loaded PlayLevelView.coffee:299:12
|Tāwhirimātea's Cheryl| Modern javascript detected, aw yeah! Angel.coffee:67:12
|Tāwhirimātea's Cheryl| Worker initialized after 1000ms Angel.coffee:67:12
|Tāwhirimātea's Cyril| Modern javascript detected, aw yeah! Angel.coffee:67:12
|Tāwhirimātea's Cyril| Worker initialized after 832ms Angel.coffee:67:12
|Tāwhirimātea's Cheryl| Using modern language plugin: cpp Angel.coffee:67:12
|Tāwhirimātea's Cheryl| Generated random seed 7970558221 of type submissionCount from sessionIDs 626441d120e2d0002b065826 submissionCount 0 Angel.coffee:67:12
SuperModel for Level loaded in 8627 ms LevelLoader.coffee:503:12
|Tāwhirimātea's Cheryl| And it was so: (1.467ms per frame, 240 frames)
Simulation   : 352ms 
Serialization: 10ms
Delivery     : 1ms
FPS          : 2556.8 Angel.coffee:67:12
Level unveiled after 8.81s PlayLevelView.coffee:267:12
WebGL warning: drawArraysInstanced: Tex image TEXTURE_2D level 0 is incurring lazy initialization. 27
Built sheet:  Trapper                  47ms  Sync   (Portrait) ThangType.coffee:224:12
PlayLevelView: Create LevelLoader PlayLevelView.coffee:191:12
Populated defaults for Level Swift Dagger in 37ms CocoModel.coffee:110:12
LevelLoader: loading session: 
Object { cid: "c2512", attributes: {…}, _changing: false, _previousAttributes: {…}, changed: {}, _pending: false, _events: {…}, saveBackup: K(), usesVersions: false, url: r()
, … }
LevelLoader.coffee:200:14
LevelLoader: Reason not loaded: worldNecessities still loading 44 LevelLoader.coffee:456:12
Loading dependencies for session:  
Object { cid: "c2512", attributes: {…}, _changing: false, _previousAttributes: {…}, changed: {}, _pending: false, _events: {…}, saveBackup: K(), usesVersions: false, url: r()
, … }
LevelLoader.coffee:248:12
LevelLoader: Reason not loaded: worldNecessities still loading 58 LevelLoader.coffee:456:12
World necessities loaded. LevelLoader.coffee:471:12
World has been initialized from level loader. LevelLoader.coffee:619:12
PlayLevelView: world necessities loaded PlayLevelView.coffee:299:12
|盘古's Pam| Modern javascript detected, aw yeah! Angel.coffee:67:12
|盘古's Pam| Worker initialized after 453ms Angel.coffee:67:12
|盘古's Lana| Modern javascript detected, aw yeah! Angel.coffee:67:12
|盘古's Lana| Worker initialized after 321ms Angel.coffee:67:12
|盘古's Pam| Using modern language plugin: cpp Angel.coffee:67:12
|盘古's Pam| Generated random seed 4077776809 of type submissionCount from sessionIDs 62434ab1ec74b10025c8188b submissionCount 2 Angel.coffee:67:12
|盘古's Pam| The world ended in lost on frame 218 Angel.coffee:67:12
SuperModel for Level loaded in 2004 ms LevelLoader.coffee:503:12
|盘古's Pam| And it was so: (1.986ms per frame, 218 frames)
Simulation   : 433ms 
Serialization: 15ms
Delivery     : 1ms
FPS          : 1006.9 Angel.coffee:67:12
Level unveiled after 2.19s PlayLevelView.coffee:267:12
WebGL warning: drawArraysInstanced: Tex image TEXTURE_2D level 0 is incurring lazy initialization. 28
Built sheet:  Trapper                  46ms  Sync   (Portrait) ThangType.coffee:224:12
Element.setCapture() is deprecated. Use Element.setPointerCapture() instead. For more help https://developer.mozilla.org/docs/Web/API/Element/setPointerCapture ace.js:2207:37
Element.releaseCapture() is deprecated. Use Element.releasePointerCapture() instead. For more help https://developer.mozilla.org/docs/Web/API/Element/releasePointerCapture ace.js:2271:42
WebGL warning: drawArraysInstanced: Tex image TEXTURE_2D level 0 is incurring lazy initialization. 3
PlayLevelView: Create LevelLoader PlayLevelView.coffee:191:12
LevelLoader: loading session: 
Object { cid: "c4790", attributes: {…}, _changing: false, _previousAttributes: {…}, changed: {…}, _pending: false, _events: {…}, saveBackup: K(), usesVersions: false, url: r()
, … }
LevelLoader.coffee:200:14
LevelLoader: Reason not loaded: worldNecessities still loading 41 LevelLoader.coffee:456:12
Loading dependencies for session:  
Object { cid: "c4790", attributes: {…}, _changing: false, _previousAttributes: {…}, changed: {…}, _pending: false, _events: {…}, saveBackup: K(), usesVersions: false, url: r()
, … }
LevelLoader.coffee:248:12
LevelLoader: Reason not loaded: worldNecessities still loading 65 LevelLoader.coffee:456:12
|Ares's Archer| Modern javascript detected, aw yeah! Angel.coffee:67:12
LevelLoader: Reason not loaded: worldNecessities still loading 5 LevelLoader.coffee:456:12
World necessities loaded. LevelLoader.coffee:471:12
World has been initialized from level loader. LevelLoader.coffee:619:12
PlayLevelView: world necessities loaded PlayLevelView.coffee:299:12
|Ares's Woodhouse| Modern javascript detected, aw yeah! Angel.coffee:67:12
|Ares's Archer| Worker initialized after 752ms Angel.coffee:67:12
|Ares's Woodhouse| Worker initialized after 564ms Angel.coffee:67:12
|Ares's Archer| Using modern language plugin: cpp Angel.coffee:67:12
|Ares's Archer| Generated random seed 7970558221 of type submissionCount from sessionIDs 626441d120e2d0002b065826 submissionCount 0 Angel.coffee:67:12
SuperModel for Level loaded in 2062 ms LevelLoader.coffee:503:12
|Ares's Archer| And it was so: (1.038ms per frame, 240 frames)
Simulation   : 249ms 
Serialization: 7ms
Delivery     : 1ms
FPS          : 3614.5 Angel.coffee:67:12
Level unveiled after 2.22s PlayLevelView.coffee:267:12
WebGL warning: drawArraysInstanced: Tex image TEXTURE_2D level 0 is incurring lazy initialization. 27
Built sheet:  Trapper                  32ms  Sync   (Portrait)

Level Name: Swift Dagger
In-game username: Witalis
Description of the bug: Code can’t run.
Code:

// Use your bow at long range and dagger at short range.

int main() {
    while(true) {
       auto enemy = hero.findNearestEnemy();
    if (hero.isReady("throw")) {
    hero.throw(enemy);
    }
    }
    return 0;
}


Console Logs of Error:

This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. safety-blanket
Some cookies are misusing the recommended “SameSite“ attribute 7
Loading failed for the <script> with source “https://connect.facebook.net/en_US/fbevents.js”. safety-blanket:1:1
Failure loading StripeCheckout API, returning empty object. stripe.coffee:12:10
PlayLevelView: Create LevelLoader PlayLevelView.coffee:191:12
Populated defaults for Level Safety Blanket in 17ms CocoModel.coffee:110:12
LevelLoader: loading session: 
Object { cid: "c16", attributes: {…}, _changing: false, _previousAttributes: {…}, changed: {}, _pending: false, _events: {…}, saveBackup: K(), usesVersions: false, url: r()
, … }
LevelLoader.coffee:200:14
LevelLoader: Reason not loaded: worldNecessities still loading 44 LevelLoader.coffee:456:12
Loading dependencies for session:  
Object { cid: "c16", attributes: {…}, _changing: false, _previousAttributes: {…}, changed: {}, _pending: false, _events: {…}, saveBackup: K(), usesVersions: false, url: r()
, … }
LevelLoader.coffee:248:12
LevelLoader: Reason not loaded: worldNecessities still loading 67 LevelLoader.coffee:456:12
World necessities loaded. LevelLoader.coffee:471:12
World has been initialized from level loader. LevelLoader.coffee:619:12
PlayLevelView: world necessities loaded PlayLevelView.coffee:299:12
|Tāwhirimātea's Cheryl| Modern javascript detected, aw yeah! Angel.coffee:67:12
|Tāwhirimātea's Cheryl| Worker initialized after 1000ms Angel.coffee:67:12
|Tāwhirimātea's Cyril| Modern javascript detected, aw yeah! Angel.coffee:67:12
|Tāwhirimātea's Cyril| Worker initialized after 832ms Angel.coffee:67:12
|Tāwhirimātea's Cheryl| Using modern language plugin: cpp Angel.coffee:67:12
|Tāwhirimātea's Cheryl| Generated random seed 7970558221 of type submissionCount from sessionIDs 626441d120e2d0002b065826 submissionCount 0 Angel.coffee:67:12
SuperModel for Level loaded in 8627 ms LevelLoader.coffee:503:12
|Tāwhirimātea's Cheryl| And it was so: (1.467ms per frame, 240 frames)
Simulation   : 352ms 
Serialization: 10ms
Delivery     : 1ms
FPS          : 2556.8 Angel.coffee:67:12
Level unveiled after 8.81s PlayLevelView.coffee:267:12
WebGL warning: drawArraysInstanced: Tex image TEXTURE_2D level 0 is incurring lazy initialization. 27
Built sheet:  Trapper                  47ms  Sync   (Portrait) ThangType.coffee:224:12
PlayLevelView: Create LevelLoader PlayLevelView.coffee:191:12
Populated defaults for Level Swift Dagger in 37ms CocoModel.coffee:110:12
LevelLoader: loading session: 
Object { cid: "c2512", attributes: {…}, _changing: false, _previousAttributes: {…}, changed: {}, _pending: false, _events: {…}, saveBackup: K(), usesVersions: false, url: r()
, … }
LevelLoader.coffee:200:14
LevelLoader: Reason not loaded: worldNecessities still loading 44 LevelLoader.coffee:456:12
Loading dependencies for session:  
Object { cid: "c2512", attributes: {…}, _changing: false, _previousAttributes: {…}, changed: {}, _pending: false, _events: {…}, saveBackup: K(), usesVersions: false, url: r()
, … }
LevelLoader.coffee:248:12
LevelLoader: Reason not loaded: worldNecessities still loading 58 LevelLoader.coffee:456:12
World necessities loaded. LevelLoader.coffee:471:12
World has been initialized from level loader. LevelLoader.coffee:619:12
PlayLevelView: world necessities loaded PlayLevelView.coffee:299:12
|盘古's Pam| Modern javascript detected, aw yeah! Angel.coffee:67:12
|盘古's Pam| Worker initialized after 453ms Angel.coffee:67:12
|盘古's Lana| Modern javascript detected, aw yeah! Angel.coffee:67:12
|盘古's Lana| Worker initialized after 321ms Angel.coffee:67:12
|盘古's Pam| Using modern language plugin: cpp Angel.coffee:67:12
|盘古's Pam| Generated random seed 4077776809 of type submissionCount from sessionIDs 62434ab1ec74b10025c8188b submissionCount 2 Angel.coffee:67:12
|盘古's Pam| The world ended in lost on frame 218 Angel.coffee:67:12
SuperModel for Level loaded in 2004 ms LevelLoader.coffee:503:12
|盘古's Pam| And it was so: (1.986ms per frame, 218 frames)
Simulation   : 433ms 
Serialization: 15ms
Delivery     : 1ms
FPS          : 1006.9 Angel.coffee:67:12
Level unveiled after 2.19s PlayLevelView.coffee:267:12
WebGL warning: drawArraysInstanced: Tex image TEXTURE_2D level 0 is incurring lazy initialization. 28
Built sheet:  Trapper                  46ms  Sync   (Portrait) ThangType.coffee:224:12
Element.setCapture() is deprecated. Use Element.setPointerCapture() instead. For more help https://developer.mozilla.org/docs/Web/API/Element/setPointerCapture ace.js:2207:37
Element.releaseCapture() is deprecated. Use Element.releasePointerCapture() instead. For more help https://developer.mozilla.org/docs/Web/API/Element/releasePointerCapture ace.js:2271:42
WebGL warning: drawArraysInstanced: Tex image TEXTURE_2D level 0 is incurring lazy initialization. 3
PlayLevelView: Create LevelLoader PlayLevelView.coffee:191:12
LevelLoader: loading session: 
Object { cid: "c4790", attributes: {…}, _changing: false, _previousAttributes: {…}, changed: {}, _pending: false, _events: {…}, saveBackup: K(), usesVersions: false, url: r()
, … }
LevelLoader.coffee:200:14
LevelLoader: Reason not loaded: worldNecessities still loading 41 LevelLoader.coffee:456:12
Loading dependencies for session:  
Object { cid: "c4790", attributes: {…}, _changing: false, _previousAttributes: {…}, changed: {}, _pending: false, _events: {…}, saveBackup: K(), usesVersions: false, url: r()
, … }
LevelLoader.coffee:248:12
LevelLoader: Reason not loaded: worldNecessities still loading 65 LevelLoader.coffee:456:12
|Ares's Archer| Modern javascript detected, aw yeah! Angel.coffee:67:12
LevelLoader: Reason not loaded: worldNecessities still loading 5 LevelLoader.coffee:456:12
World necessities loaded. LevelLoader.coffee:471:12
World has been initialized from level loader. LevelLoader.coffee:619:12
PlayLevelView: world necessities loaded PlayLevelView.coffee:299:12
|Ares's Woodhouse| Modern javascript detected, aw yeah! Angel.coffee:67:12
|Ares's Archer| Worker initialized after 752ms Angel.coffee:67:12
|Ares's Woodhouse| Worker initialized after 564ms Angel.coffee:67:12
|Ares's Archer| Using modern language plugin: cpp Angel.coffee:67:12
|Ares's Archer| Generated random seed 7970558221 of type submissionCount from sessionIDs 626441d120e2d0002b065826 submissionCount 0 Angel.coffee:67:12
SuperModel for Level loaded in 2062 ms LevelLoader.coffee:503:12
|Ares's Archer| And it was so: (1.038ms per frame, 240 frames)
Simulation   : 249ms 
Serialization: 7ms
Delivery     : 1ms
FPS          : 3614.5 Angel.coffee:67:12
Level unveiled after 2.22s PlayLevelView.coffee:267:12
WebGL warning: drawArraysInstanced: Tex image TEXTURE_2D level 0 is incurring lazy initialization. 27
Built sheet:  Trapper                  32ms  Sync   (Portrait) ThangType.coffee:224:12
WebGL warning: drawArraysInstanced: Tex image TEXTURE_2D level 0 is incurring lazy initialization. 4
PlayLevelView: Create LevelLoader PlayLevelView.coffee:191:12
PlayLevelView: Create LevelLoader PlayLevelView.coffee:191:12
Populated defaults for Level Swift Dagger in 29ms CocoModel.coffee:110:12
LevelLoader: loading session: 
Object { cid: "c12022", attributes: {…}, _changing: false, _previousAttributes: {…}, changed: {…}, _pending: false, _events: {…}, saveBackup: K(), usesVersions: false, url: r()
, … }
LevelLoader.coffee:200:14
LevelLoader: Reason not loaded: worldNecessities still loading 44 LevelLoader.coffee:456:12
Loading dependencies for session:  
Object { cid: "c12022", attributes: {…}, _changing: false, _previousAttributes: {…}, changed: {…}, _pending: false, _events: {…}, saveBackup: K(), usesVersions: false, url: r()
, … }
LevelLoader.coffee:248:12
LevelLoader: Reason not loaded: worldNecessities still loading 58 LevelLoader.coffee:456:12
World necessities loaded. LevelLoader.coffee:471:12
World has been initialized from level loader. LevelLoader.coffee:619:12
PlayLevelView: world necessities loaded PlayLevelView.coffee:299:12
|Hel's Krieger| Modern javascript detected, aw yeah! Angel.coffee:67:12
|Hel's Krieger| Worker initialized after 638ms Angel.coffee:67:12
|Hel's Ray| Modern javascript detected, aw yeah! Angel.coffee:67:12
|Hel's Ray| Worker initialized after 498ms Angel.coffee:67:12
|Hel's Krieger| Using modern language plugin: cpp Angel.coffee:67:12
|Hel's Krieger| Generated random seed 4077776809 of type submissionCount from sessionIDs 62434ab1ec74b10025c8188b submissionCount 2 Angel.coffee:67:12
|Hel's Krieger| The world ended in lost on frame 218 Angel.coffee:67:12
SuperModel for Level loaded in 2137 ms LevelLoader.coffee:503:12
Level unveiled after 2.31s PlayLevelView.coffee:267:12
|Hel's Krieger| And it was so: (2.050ms per frame, 218 frames)
Simulation   : 447ms 
Serialization: 15ms
Delivery     : 1ms
FPS          : 975.4 Angel.coffee:67:12
WebGL warning: drawArraysInstanced: Tex image TEXTURE_2D level 0 is incurring lazy initialization. 28
Built sheet:  Trapper                  43ms  Sync   (Portrait)

Hmm, sample code should have this, gotta put the logic in the int main function:

int main() {
    // This says to run the soldierLogic function when the soldier is spawned.
    soldier.on("spawn", soldierLogic);
    return 0;
}

I fixed Safety Blanket, it wasn’t handling the comments within the array.

Will take us a while to rewrite throw and fix Swift Dagger.

Level Name: Arrowproof Wolf
In-game username: Witalis
Description of the bug: One more problem with semicolon.
Code:

// Collect mushrooms.

int main() {
    // First, come to the wolf pet and wake up it (say).
    hero.moveXY(12, 34);
    hero.say("Wake up lazy wolfy");
    // Next collect mushrooms just usual items.
    while(true) {
    auto arrow = hero.findEnemyMissiles()[0];
    auto item = hero.findNearestItem();
    if (arrow){
    pet.catch(arrow);
    }
    if (item){
    hero.moveXY(item.pos.x, item.pos.y);
    }
}
    return 0;
}

WebGL warning: drawArraysInstanced: Tex image TEXTURE_2D level 0 is incurring lazy initialization. 6
Some cookies are misusing the recommended “SameSite“ attribute 41
WebGL warning: drawArraysInstanced: Tex image TEXTURE_2D level 0 is incurring lazy initialization. 28
Element.setCapture() is deprecated. Use Element.setPointerCapture() instead. For more help https://developer.mozilla.org/docs/Web/API/Element/setPointerCapture ace.js:2207:37
Element.releaseCapture() is deprecated. Use Element.releasePointerCapture() instead. For more help https://developer.mozilla.org/docs/Web/API/Element/releasePointerCapture ace.js:2271:42
WebGL warning: drawArraysInstanced: Tex image TEXTURE_2D level 0 is incurring lazy initialization. 4
After reporting 32, no further warnings will be reported for this WebGL context.
WebGL warning: drawArraysInstanced: Tex image TEXTURE_2D level 0 is incurring lazy initialization. 28
WebGL warning: drawArraysInstanced: Tex image TEXTURE_2D level 0 is incurring lazy initialization. 4
After reporting 32, no further warnings will be reported for this WebGL context.
WebGL warning: drawArraysInstanced: Tex image TEXTURE_2D level 0 is incurring lazy initialization. 28
WebGL warning: drawArraysInstanced: Tex image TEXTURE_2D level 0 is incurring lazy initialization. 28
PlayLevelView: Create LevelLoader PlayLevelView.coffee:191:12
LevelLoader: session already loaded: 
Object { cid: "c6279", attributes: {…}, _changing: false, _previousAttributes: {…}, changed: {…}, _pending: false, _events: {…}, saveBackup: K(), usesVersions: false, url: r(), … }
LevelLoader.coco.coffee:196:14
Loading dependencies for session:  
Object { cid: "c6279", attributes: {…}, _changing: false, _previousAttributes: {…}, changed: {…}, _pending: false, _events: {…}, saveBackup: K(), usesVersions: false, url: r(), … }
LevelLoader.coco.coffee:248:12
LevelLoader: Reason not loaded: worldNecessities still loading 13 LevelLoader.coco.coffee:456:12
World necessities loaded. LevelLoader.coco.coffee:471:12
World has been initialized from level loader. LevelLoader.coco.coffee:619:12
PlayLevelView: world necessities loaded PlayLevelView.coffee:299:12
|Prometheus's Archer 1| Modern javascript detected, aw yeah! Angel.coco.coffee:67:12
|Prometheus's Archer 1| Worker initialized after 458ms Angel.coco.coffee:67:12
|Prometheus's Ray 1| Modern javascript detected, aw yeah! Angel.coco.coffee:67:12
|Prometheus's Ray 1| Worker initialized after 210ms Angel.coco.coffee:67:12
|Prometheus's Archer 1| Using modern language plugin: cpp Angel.coco.coffee:67:12
|Prometheus's Archer 1| Generated random seed 2745838596 of type submissionCount from sessionIDs 6293868f9f9c4600232fccf0 submissionCount 1 Angel.coco.coffee:67:12
|Prometheus's Archer 1| mushroom 15 Angel.coco.coffee:67:12
|Prometheus's Archer 1| The world ended in won on frame 1106 50 Angel.coco.coffee:67:12
|Prometheus's Archer 1| mushroom Angel.coco.coffee:67:12
|Prometheus's Archer 1| The world ended in won on frame 1106 10 Angel.coco.coffee:67:12
SuperModel for Level loaded in 1640 ms LevelLoader.coco.coffee:503:12
|Prometheus's Archer 1| And it was so: (0.533ms per frame, 1106 frames)
Simulation   : 589ms 
Serialization: 25ms
Delivery     : 3ms
FPS          : 2816.6 Angel.coco.coffee:67:12
Level unveiled after 1.84s PlayLevelView.coffee:267:12
WebGL warning: drawArraysInstanced: Tex image TEXTURE_2D level 0 is incurring lazy initialization. 28
Built sheet:  Sorcerer                 24ms  Sync   (Portrait) ThangType.coco.coffee:224:12
|Prometheus's Archer 1| ===== Profile: None collected ===== Angel.coco.coffee:67:12
|Prometheus's Archer 1| Generated random seed 2745838596 of type submissionCount from sessionIDs 6293868f9f9c4600232fccf0 submissionCount 1 Angel.coco.coffee:67:12
|Prometheus's Archer 1| mushroom 15 Angel.coco.coffee:67:12
|Prometheus's Archer 1| The world ended in won on frame 1106 50 Angel.coco.coffee:67:12
|Prometheus's Archer 1| mushroom Angel.coco.coffee:67:12
|Prometheus's Archer 1| The world ended in won on frame 1106 10 Angel.coco.coffee:67:12
|Prometheus's Archer 1| And it was so: (0.544ms per frame, 1106 frames)
Simulation   : 602ms 
Serialization: 7ms
Delivery     : 2ms
FPS          : 2755.8 Angel.coco.coffee:67:12
Cannot show action say for Sorcerer because it DNE Lank.coco.coffee:427:14
|Prometheus's Archer 1| ===== Profile: None collected ===== Angel.coco.coffee:67:12
|Prometheus's Archer 1| Generated random seed 2745838597 of type submissionCount from sessionIDs 6293868f9f9c4600232fccf0 submissionCount 2 Angel.coco.coffee:67:12
|Prometheus's Archer 1| mushroom 15 Angel.coco.coffee:67:12
|Prometheus's Archer 1| The world ended in won on frame 1020 36 Angel.coco.coffee:67:12
|Prometheus's Archer 1| mushroom Angel.coco.coffee:67:12
|Prometheus's Archer 1| The world ended in won on frame 1020 24 Angel.coco.coffee:67:12
|Prometheus's Archer 1| And it was so: (1.863ms per frame, 1020 frames)
Simulation   : 1900ms 
Serialization: 5ms
Delivery     : 3ms
FPS          : 805.3 Angel.coco.coffee:67:12
PlayLevelView: Create LevelLoader PlayLevelView.coffee:191:12
LevelLoader: session already loaded: 
Object { cid: "c6279", attributes: {…}, _changing: false, _previousAttributes: {…}, changed: {…}, _pending: false, _events: {…}, saveBackup: K(), usesVersions: false, url: r(), … }
LevelLoader.coco.coffee:196:14
Loading dependencies for session:  
Object { cid: "c6279", attributes: {…}, _changing: false, _previousAttributes: {…}, changed: {…}, _pending: false, _events: {…}, saveBackup: K(), usesVersions: false, url: r(), … }
LevelLoader.coco.coffee:248:12
LevelLoader: Reason not loaded: worldNecessities still loading 2 LevelLoader.coco.coffee:456:12
World necessities loaded. LevelLoader.coco.coffee:471:12
World has been initialized from level loader. LevelLoader.coco.coffee:619:12
PlayLevelView: world necessities loaded PlayLevelView.coffee:299:12
|Janus's Cheryl 1| Modern javascript detected, aw yeah! Angel.coco.coffee:67:12
|Janus's Cyril 1| Modern javascript detected, aw yeah! Angel.coco.coffee:67:12
|Janus's Cheryl 1| Worker initialized after 564ms Angel.coco.coffee:67:12
|Janus's Cyril 1| Worker initialized after 340ms Angel.coco.coffee:67:12
|Janus's Cheryl 1| Using modern language plugin: cpp Angel.coco.coffee:67:12
|Janus's Cheryl 1| Generated random seed 2745838595 of type submissionCount from sessionIDs 6293868f9f9c4600232fccf0 submissionCount 0 Angel.coco.coffee:67:12
|Janus's Cheryl 1| mushroom 15 Angel.coco.coffee:67:12
|Janus's Cheryl 1| The world ended in won on frame 913 60 Angel.coco.coffee:67:12
SuperModel for Level loaded in 1534 ms LevelLoader.coco.coffee:503:12
|Janus's Cheryl 1| And it was so: (0.590ms per frame, 913 frames)
Simulation   : 539ms 
Serialization: 24ms
Delivery     : 3ms
FPS          : 2540.8 Angel.coco.coffee:67:12
Level unveiled after 1.69s PlayLevelView.coffee:267:12
WebGL warning: drawArraysInstanced: Tex image TEXTURE_2D level 0 is incurring lazy initialization. 28
|Janus's Cheryl 1| ===== Profile: None collected ===== Angel.coco.coffee:67:12
|Janus's Cheryl 1| Generated random seed 2745838595 of type submissionCount from sessionIDs 6293868f9f9c4600232fccf0 submissionCount 0 Angel.coco.coffee:67:12
|Janus's Cheryl 1| And it was so: (0.302ms per frame, 1200 frames)
Simulation   : 363ms 
Serialization: 4ms
Delivery     : 1ms
FPS          : 4958.7 Angel.coco.coffee:67:12
WebGL warning: drawArraysInstanced: Tex image TEXTURE_2D level 0 is incurring lazy initialization. 4
After reporting 32, no further warnings will be reported for this WebGL context.
|Janus's Cheryl 1| Generated random seed 2745838595 of type submissionCount from sessionIDs 6293868f9f9c4600232fccf0 submissionCount 0 Angel.coco.coffee:67:12
|Janus's Cheryl 1| And it was so: (0.368ms per frame, 1200 frames)
Simulation   : 442ms 
Serialization: 8ms
Delivery     : 2ms
FPS          : 4072.4 Angel.coco.coffee:67:12

1 Like

Any issues with throw() should be fixed. :+1:

**Level Name: Teleport Lasso
**In-game username: Tardcircus
**Description of the bug: misconfigured instructions and or error. line 8 will trigger an error that there is no target, but seems to be at random. when running the code it works, but submitting will trigger error. without putting the distance after if(enemy). but re submitting code will trigger it to pass
Code:

 Our wizards teleport ogres from their camp here.
 They appear for a short period and they are stunned.
Attack only weak and near ogres.

int main() {
    while (true) {
        auto enemy = hero.findNearestEnemy();
        float distance = hero.distanceTo(enemy); // <------------ Line Triggering error 
        If enemy.type is "munchkin"
                         //  <------------ If placed after if statment. error is resolved
        AND the distance to it is less than 20m
        
            // Then attack it.
            
    }
    
    return 0;
}

Console Logs of Error:
‘’’ Distance to target is null

not sure if this is the kind of bugs your looking for, but the game has many little misconfigurations like these

Hi please format your code properly using the code button or with ``` :)

1 Like

Was the starter code originally like that? Logically the error makes sense, because if there isn’t an enemy, you can’t call the distance function on it, so it has to be after the if-statement.

Yes. That is the code as its presented to the player. I didnt have any issues resolving it, but i played around with it for a bit trying at that made me think that maybe this was unintentionally done