Drop The Flag: Weird Bug (not the usual stuff)

Hey there, I am using Javascript and kind of got stuck on the level ‘Drop The Flag’. The solutions I found so far don’t work for me, since either some people forgot to press the submit button, which I never did, or wrote a wrong code, which I think I didn’t. ^^

My code:

while(true) {
var flag = hero.findFlag();
if (flag) {
// Wie bekommt man flagX und flagY von der Flaggenposition?
// (Schaue weiter unten, wie man x und y von Gegenständen erhalten kann.)
var flag = flag.pos;
var fX = flag.x;
var fY = flag.y;
hero.moveXY(fX, fY);
hero.buildXY(“fire-trap”, fX, fY);
else {
var item = hero.findNearestItem();
if (item) {
var itemPos = item.pos;
var itemX = itemPos.x;
var itemY = itemPos.y;
hero.moveXY(itemX, itemY);

However, I am not able to place flags. Yes, I know I have to click ‘Submit’ for the flags to work, I do that every time…
Here’s what I do:

I click on ‘Submit’. Then, I click on one of the three flag icons in the left corner. Finally, when I go back to the map, I can actually see a transparent flag and can move it around, but are not able to place it down by clicking with the mouse.

Windows 10, Newest Firefox Version.

There shouldn’t be a problem unless my code is wrong. Do I miss something very obvious right here? I don’t get it.

EDIT: Sorry for not formatting the post, it’s aweful to read. This is my first post, I thought it would do that automatically.

1 Like

Just out of curiosity, you do have the flag equipped on the character right?

1 Like

Yes, indeed. :confused:

1 Like

Problem is somehow solved!

I started the game later this day and all of a sudden I was able to place flags… :joy: After that there was like one thing I still had to change in the code and that was it!

One cause could be the servers being stressed at that time and because of that causing a bug on that level, I don’t know.

1 Like

no idea about the server, I was looking at the code and it seemed ok, that is why I asked.

1 Like