#$&^[email protected]#)$^@#$^ syntax

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.


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”;

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

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

{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! :wink:

“Statement block must be terminated by ‘}’”

done, so }

well it depends if you do


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

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