# Help with syntax of code--can't figure out problem

**URL:** <https://forum.kirupa.com/t/help-with-syntax-of-code-cant-figure-out-problem/248784>\
**Category:** Uncategorized\
**Created:** [January 11, 2008, 3:20pm UTC](https://forum.kirupa.com/t/help-with-syntax-of-code-cant-figure-out-problem/248784 "2008-01-11T15:20:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![michmons](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@michmons](https://forum.kirupa.com/u/michmons)\
**Post date:** [January 11, 2008, 3:20pm UTC](https://forum.kirupa.com/t/help-with-syntax-of-code-cant-figure-out-problem/248784/1 "2008-01-11T15:20:56Z")

</div>

[SIZE=1]Flash is telling me that there are 2 syntax errors in my code–I can’t figure it out. I have put the text in red that Flash is telling me is wrong. If someone could help me figure it out…

displayTime = 20;

function countDown() {  
[COLOR=Red] displayTime–;  
if (displayTime \<= 0) {[/COLOR]  
var n:Number = (Math.floor(Math.random()\*5)+1);  
var blnOK:Boolean = false;

```
if (n == 5) {
       if (_root.Singleton.sContainer7 == "shakespearBust_11") { 
    blnOK = true;
    }
  } else if (n == 3) {
       if (_root.Singleton.sContainer7 == "lavaLamp_7") {
    blnOK = true;
       }
  } else {
       blnOK = true;
      }
 }
 
 if (blnOK) {
       displayTime = 20;
       trace("Times Up");
       trace(_root.Singleton.sContainer7); 
       trace(_root.Singleton.sContainer11);
       container21_mc.loadMovie("objects/random"+n+"_21/random"+n+"_21.swf", "_root.movieclip"); 
  }

```

timer = setInterval(countDown, 1000);  
[/SIZE]
