# Stupid syntax!

**URL:** <https://forum.kirupa.com/t/stupid-syntax/5488>\
**Category:** Uncategorized\
**Created:** [September 12, 2002, 9:44pm UTC](https://forum.kirupa.com/t/stupid-syntax/5488 "2002-09-12T21:44:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![shuga](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@shuga](https://forum.kirupa.com/u/shuga)\
**Post date:** [September 12, 2002, 9:44pm UTC](https://forum.kirupa.com/t/stupid-syntax/5488/1 "2002-09-12T21:44:33Z")

</div>

i got this error

```auto

Scene=Scene 1, Layer=Layer 1, Frame=1: Line 6: ';' expected
     		percentLoaded=Math.round((_root.getBytesLoaded)))

Scene=Scene 1, Layer=Layer 1, Frame=1: Line 7: ';' expected
     		/(_root.getBytesTotal()) * 100)

```

when i put this code in

```auto

onClipEvent (enterFrame) {
	if (_root.getBytesLoaded() == _root.getBytesTotal()) {
		gotoAndStop(2);
	} else {
		_root.stop()
		percentLoaded=Math.round((_root.getBytesLoaded)))
		/(_root.getBytesTotal()) * 100)
		loadedFile = "File is" + percentLoaded + "% loaded"
}

```

help would be greatly appreciated

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 12, 2002, 9:51pm UTC](https://forum.kirupa.com/t/stupid-syntax/5488/2 "2002-09-12T21:51:11Z")

</div>

Well, as the error msg tries to tell you , just add the " ; " at the end of your actions in the else statement: after stop();  
after \*100);  
after loaded";

and it should be ok

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 12, 2002, 9:53pm UTC](https://forum.kirupa.com/t/stupid-syntax/5488/3 "2002-09-12T21:53:21Z")

</div>

code looks like this now … with the ; added at the ends of lines 5,6 and 7

```auto

onClipEvent (enterFrame) {
	if (_root.getBytesLoaded() == _root.getBytesTotal()) {
		gotoAndStop(2);
	} else {
		_root.stop();
		percentLoaded=Math.round((_root.getBytesLoaded)));
		/(_root.getBytesTotal()) * 100);
		loadedFile = "File is" + percentLoaded + "% loaded"
}

```

still returns the same error

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 12, 2002, 10:09pm UTC](https://forum.kirupa.com/t/stupid-syntax/5488/4 "2002-09-12T22:09:30Z")

</div>

not:

```auto
} else {
		_root.stop();
		percentLoaded=Math.round((_root.getBytesLoaded)));
		/(_root.getBytesTotal()) * 100);
		loadedFile = "File is" + percentLoaded + "% loaded"
}

```

but:

```auto
} else {
		_root.stop();
		percentLoaded=Math.round((_root.getBytesLoaded()) //not here
		/(_root.getBytesTotal()) * 100);
		loadedFile = "File is" + percentLoaded + "% loaded"; //add here
}

```

coz the percentLoaded stuff goes over 2 lines, it’s loaded divided by total , result x 100, then ; for end of command

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 12, 2002, 10:11pm UTC](https://forum.kirupa.com/t/stupid-syntax/5488/5 "2002-09-12T22:11:02Z")

</div>

makes sense  
did what you said  
returns exactly the same error.:-\

sorry for the double post … i posted it here … and then thought the AC forum would be a better place 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 12, 2002, 10:21pm UTC](https://forum.kirupa.com/t/stupid-syntax/5488/6 "2002-09-12T22:21:23Z")

</div>

check beeners reply over there too, no line break, all on one line, and also recheck your pairs of opening ( versus closing) , i think there’s one too many & one missing, that should do it.
