# \#$&^!@#)$^@#$^ syntax

**URL:** <https://forum.kirupa.com/t/syntax/5512>\
**Category:** flash\
**Created:** [September 13, 2002, 3:14pm UTC](https://forum.kirupa.com/t/syntax/5512 "2002-09-13T15:14:27Z")\
**Posts on this page:** 5\
**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 13, 2002, 3:14pm UTC](https://forum.kirupa.com/t/syntax/5512/1 "2002-09-13T15:14:27Z")

</div>

k … its a new day at work and i still can’t figure this \*\*\*\* thing out. guess this is why i’m not a good coder … i have no patience for syntax.

```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";

```

here is the errors it’s returning

> 

Scene=Scene 1, Layer=Layer 1, Frame=1: Line 1: Statement block must be terminated by ‘}’  
onClipEvent (enterFrame) {

Scene=Scene 1, Layer=Layer 1, Frame=1: Line 8: Syntax error.  
loadedFile = “File is” + percentLoaded + “% loaded”;

---

<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 13, 2002, 3:36pm UTC](https://forum.kirupa.com/t/syntax/5512/2 "2002-09-13T15:36:37Z")

</div>

add this: [COLOR=darkred] **}** [/COLOR]  
at the end of the code  
this may remove both of the errors but I’m not sure…

---

<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 13, 2002, 3:38pm UTC](https://forum.kirupa.com/t/syntax/5512/3 "2002-09-13T15:38:33Z")

</div>

omfgosh  
so weird  
i was like why do i need a } at the end and why would that take away both errors … but it worked

thanks so much  
i really appreciate it

---

<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 13, 2002, 8:22pm UTC](https://forum.kirupa.com/t/syntax/5512/4 "2002-09-13T20:22:20Z")

</div>

{Hey shuga pie,

actionscript coding basics:

1.each command ends with a “;”  
2.each ( you open needs a ) to close and  
3.same for each { you need an }  
4.and there’s no “;” after the closing } of an if or else check…

READ the error messages, the solution is in there! 😉

“Statement block must be terminated by ‘}’”

done, so }

---

<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 14, 2002, 10:33am UTC](https://forum.kirupa.com/t/syntax/5512/5 "2002-09-14T10:33:00Z")

</div>

well it depends if you do

```auto

onEnterFrame = function(){
//do stuff
};

```

Thats suposed to be the corect syntax for things like that…but it will work either way 🙂 hehe
