Simulator hangs while playing a level - Siege of Stonehold

The game hangs while playing the level “Siege of Stonehold”. I tried removing cache and restarting the machine/browser. I use IE11.

Please help.

The problem can be your code. See if you do some heavy computation there. This can (if poorly done) slow done a level extremely. Save your code in a textfile somewhere on your computer and put loop in that constantly defends. If the problem persists:


This is usually a problem with your RAM. Please look in the task-manager and see if you have a high RAM-Usage (> 75%) while the level is open. While at it, look also at the CPU-Usage while playing the level. If this is close to 100% this means that your computer is working at full power and simply can not work faster.

If none of the above is the problem, try another browser (Chrome seems to have best experience followed by Firefox). If this is not possible, continue with the next step.

Try to open the Javascript-console for your browser. You can do this in the following way

  1. IE11: Open the F12-Debugwindow and press Ctrl+2 or search for console (I didn’t tried that, just read the Microsoft-Help-Page)
  2. Chrome: Ctrl+Shift+J
  3. Firefox: Ctrl+Shift+K

Copy any text, in particular any red error-message here and put it in a [details]-block. You can do this like this:

[details=Description]
Your log will go here.
[/details]

becomes

Description

Your log will go here.

1 Like

Thank you. Here is the code that I ran:

loop:
flag = self.findFlag()
if flag:
self.pickUpFlag(flag)
if flag.color is “green”:
p = flag.pos
x = p.x
y = p.y
self.buildXY(“fire-trap”,x,y)
elif flag.color is “black”:
self.pickUpFlag(flag)

It does not seem complicated. My CPU is @25% and Memory is at 55%. I cannot run the debugger as it says “access denied” when I run in the ‘submit’ mode.

For some reason, indentation is gone when I post the message. Please assume that I have the right indentation.

loop:
flag = self.findFlag()
    if flag:
        self.pickUpFlag(flag)
        if flag.color is "green":
            p = flag.pos
            x = p.x
            y = p.y
            self.buildXY("fire-trap",x,y)
        elif flag.color is "black":
            self.pickUpFlag(flag)

You will have the right indentation if you enclose your code into backticks `, as explained in the FAQ: FAQ - Check Before Posting.
It should be

```
put your code here
```

Thank you. Can you review the code and help me if I made any mistakes? Why does the simulator hang for this code?

I added the ``` to your post and the code is not formatted correctly (no indent for the “flag =”).
Please verify in your code that this line is in fact indented and edit your post. (point your mouse at your message and click the pencil icon below it.)

I don’t see any major computation in your code try chrome

1 Like