The wizards door

Im not sure if it is a bug or not but here is the code

// Move to Laszlo and get his secret number.
hero.moveXY(30, 13);
var las = hero.findNearestFriend().getSecret();

// Add 7 to Laszlo's number to get Erzsebet's number.
// Move to Erzsebet and say her magic number.
var erz = las + 7;
hero.moveXY(17, 26);
hero.say(erz);

var sim = erz / 4;
hero.moveXY(30, 39);
hero.say(sim);

hero.moveXY(43, 26);
var aga = sim * las;
hero.say(aga);

// Divide Erzsebet's number by 4 and take the remainder to get Simonyi's number.
// Go to Simonyi and tell him his number.

// Multiply Simonyi's number by Laszlo's to get Agata's number.
// Go to Agata and tell her her number.

I do not understand why the 3rnd mage does not allowe me to go on, maybe i did get it wrong, sorr, english is not my first language.

1 Like

@11135 They are asking you for the remainder of Erzsebet’s number after it is divided by 4. Using math what is the remainder?

What language do you speak? There should be translations for many of the levels in other languages…

Im Czech, divide is this ( / ) as i understand, well, solved it by puttin % instead of / and it worked, saw it in some another post of the same lvl but old, i dont know what happened and it does frustrate me, because in the next lvl divide is /.

Humm that level didn’t have translations :unamused: Sorry.

Lets take 7 and divide by 3.
3 + 3 + 1 = 7

  • the “/” works this way 7/3 = 2
  • the “%” works this way 7%3 = 1

% gives you the remainder
/ gives you the number of times it divides into

hero.say(sim);
should say something different when you use % than when you use /

Does that make sense?
I wonder if I rewrote the statement as:

"Find the remainder after dividing Erzsebet’s number by 4, this will give you Simonyi’s number. "
“Nalezne zbytek po dělení číslo Erzsébet je o 4, bude to vám číslo Simonyi je.”

Would that make more sense?
( I used google to translate )

2 Likes

Thank you good sir, now i know that i failed. :slight_smile:
Yes now its perfectly clean for me. :slight_smile:

:

i think var aga first and then hero move

1 Like

This issue is solved :slight_smile: