Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

[Solved] Can someone help me figure this out?


On the first game development island (level 14) it won’t spawn what I’ve typed in for code.

Here is my program so far.

// Skeletons are afraid of lightstones.

var player = game.spawnHeroXY("champion", 15, 35);
player.attackDamage = 60;
player.maxSpeed = 8;


// Spawn a "generator"
// Spawn a "lightstone"
// Now beat your game!

(As you can see, the specifics for a hero to spawn was already put in place. I set for the generator to be spawned, but that didn’t even appear either. I feel like I’m overlooking something…)


Can you preformat your code according to the FAQ? :slightly_smiling_face:


I THINK so. Is this good? I didn’t realize the grey box around the code was so important. lol


FYI in JavaScript always add a semicolon at the end for every code.


I wanted it formatted for lua :grinning:


Then instead of var use local


It still says that it is incorrect. :frowning:


Can you take a screenshot of the error?



Ohh! You are now doing python! To change go to game menu and change your programming language to Lua!


Oh! Haha. Had a blonde moment. Thanks!