Backwoods Forest: Fire Thrower LUA 15

Im stuck at Fire Thrower scene (LUA), could use some help. I get this error without touching the code:

And if I change the word horizontal to vertical, nothing happens and still says error. (says that fs1 is not defined etc)

Anyone who could solve this and send me an example?

Thank you

2 Likes

That’s weird. The variable player is defined, so there shouldn’t be any errors. Looks like a bug but I could be wrong.

1 Like

The CodeCombat Lua implementation needs to have “local” in front of all variable (and function) declarations.

Change line 4 to:

local player = game:spawnHeroXY("knight",40,10)

I will patch add a patch shortly

3 Likes

Sorry, I missed that. I don’t know LUA :sweat_smile:

1 Like

Patch added :slight_smile: May take a little to get through approval

2 Likes

Patch accepted, thanks!

If you want the latest code you’ll need to click the Restart button in the top right corner when in the level.

2 Likes

Could you please also check:

tahnks!

2 Likes

Patch submitted for this one too :slight_smile:

3 Likes