Deja Brew (Lua)

Hello everyone, I redo all the levels but this time in LUA. I arrived at the level, of “Deja Brew”, in the “Forest of BackWoods”. I am almost sure of my code, but I would like to ask for confirmation from you, if there is no bug on this level. I remain blocked at the 5th potion.

[detail]

potionsOnTheWall = 10
numToTakeDown = 1
while potionsOnTheWall >= 0 do
    hero:say(potionsOnTheWall .. " potions of health on the wall!")
    -- Chantez la ligne suivante:
    hero:say(potionsOnTheWall .. " potions of health!")
    -- Chantez la ligne suivante:
    potionsOnTheWall = potionsOnTheWall - numToTakeDown
    hero:say("Take " .. numToTakeDown .. " down, pass it arround!")
    -- Chantez la dernière ligne:
    hero:say(potionsOnTheWall .. " potions of health on the wall.") 
end

[/details]

Welcome back @Kifyu! Long time no see :grin:
Unfortunately I don’t know lua, so I can’t help you.

1 Like

Your code is perfect, except you added an additional “r” in “around” :]

just remove the “r” and it’ll work fine

PS. Welcome back!

1 Like

Thank you, indeed the error comes from the “r”. I found it strange that the code didn’t work. I will be more careful next time. Yes, I’m coming back in force @PeterPalov , @Aya .

2 Likes

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.