# Snakes and Ladders game in Flash MX - coding problems

**URL:** <https://forum.kirupa.com/t/snakes-and-ladders-game-in-flash-mx-coding-problems/47172>\
**Category:** flash\
**Created:** [March 31, 2004, 9:41pm UTC](https://forum.kirupa.com/t/snakes-and-ladders-game-in-flash-mx-coding-problems/47172 "2004-03-31T21:41:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maxim](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@Maxim](https://forum.kirupa.com/u/Maxim)\
**Post date:** [March 31, 2004, 9:41pm UTC](https://forum.kirupa.com/t/snakes-and-ladders-game-in-flash-mx-coding-problems/47172/1 "2004-03-31T21:41:15Z")

</div>

ok, i have been trying to create this game, but i am having so many problems. i need your help people.

i am recieving the following errors:

Symbol=Die, Layer=Layer 3, Frame=1: Line 1: Statement block must be terminated by ‘}’  
on (release) {

Symbol=Die, Layer=Layer 3, Frame=1: Line 42: Syntax error.

this is the code for it:

on (release) {  
display = Math.round(Math.random()\*5)+1;  
if (display==1) {  
\_root.Die.gotoAndStop(1);

```
}
if (display==2) {
	_root.Die.gotoAndStop(2);
	
}
if (display==3) {
	_root.Die.gotoAndStop(3);
	
}
if (display==4) {
	_root.Die.gotoAndStop(4);
	
}
if (display==5) {
	_root.Die.gotoAndStop(5);
}
else if (display==6) {
	_root.Die.gotoAndStop(6);
	
}

```

PlayerNewPosition = PlayerPosition + display;  
PlayerPosition = PlayerNewPosition;

```
Player._x = _root[PlayerNewPosition]._x;
Player._y = _root[PlayerNewPosition]._y;

if (squares[PlayerNewPosition]!=0)
{
}
PlayerNewPosition = squares[PlayerNewPosition]

PlayerPosition = PlayerNewPosition;

Player._x = _root[PlayerNewPosition]._x;
Player._y = _root[PlayerNewPosition]._y;

```

if someone has msn messenger, find me at [comradecarlos@hotmail.com](mailto:comradecarlos@hotmail.com) and i can send you the .fla file so it is clearer. i would appreciate any kind of help. thanks.
