[SOLVED] Help with "Magic Exam", Lua

Lua uses then and end so its indents don’t affect it, and, fun fact, you can use a bit of JavaScript syntax in most languages CodeCombat offers

1 Like

how about you try making those two elseif statements, it might work

1 Like

does it show any error or does the character just not move?

1 Like

I’m at work but when I get home I’ll let you know if the code works that way.

My hero will dead stop when it gets to the room with the potion/poison. No error, just not do anything else. If there was an error I feel like that would at least give me something to go on lol

@Aya You have found the solution! elseif allows it to run for some reason while multiple if’s didn’t. Perhaps it got confused as it was assuming none of the other if’s would work if the first if wasn’t true or something like that. Whatever the reason may be, Thank you for your help!

2 Likes

You’re welcome, happy it worked

Big brain aya

200000

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