Backwoods Forest: Fire Thrower LUA 15


#1

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

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


#3

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


#4

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


#5

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


#6

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.


#7

Could you please also check:

tahnks!


#8

Patch submitted for this one too :slight_smile: