loop {
flag = this.findFlag();
if (Flag)
flagpos = flag.pos;
flagX = flagpos.x;
flagY = flagpos.y;
this.buildXY('fire-trap',flagX,flagY);
this.pickUpFlag(flag);
}
else; {
item = this.findNearestItem();
if (item) {
itemPos = item.pos;
itemX = itemPos.x;
itemY = itemPos.y;
this.moveXY(itemX, itemY);
}
}
}
This is my code so far, I have tried many things to get passed this level but i just can’t seem to get passed this level
please help