# Syntax Problems

**URL:** https://forum.kirupa.com/t/syntax-problems/190027
**Category:** flash
**Created:** [June 8, 2006, 3:08am UTC](https://forum.kirupa.com/t/syntax-problems/190027 "2006-06-08T03:08:30Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Ximenao](https://avatars.discourse-cdn.com/v4/letter/x/eada6e/32.png) [@Ximenao](https://forum.kirupa.com/u/Ximenao)
#### Post date: [June 8, 2006, 3:08am UTC](https://forum.kirupa.com/t/syntax-problems/190027/1 "2006-06-08T03:08:30Z")

</div>

Hi. Plz someone help me.  
I’ve been trying to program a simple bug zapper game, I mean, I’ve done a few games before, so this should be simple enough, right? But everytime I test the movie, the outputpalette gives me this message:

**Error** Scene=Game, layer=Codeing, frame=1:Line 152: ‘{’ expected  
function randRange(minNum:Number, maxNum:Number):Number {

**Error** Scene=Game, layer=Codeing, frame=1:Line 154: Unexpected ‘}’ encountered  
}

The section of the code that’s causing the trouble is this:

/\* create a function that returns a random integer between two specified numbers.  
This allows you to add some subtle differences in size and speed for the movie clips on the Stage. _/  
function randRange(minNum:Number, maxNum:Number):Number {  
return (Math.floor(Math.random()_(maxNum-minNum+1))+minNum);  
}

Can anyone help me?
