1 Replies - 3153 Views - Last Post: 30 May 2013 - 08:02 PM

#1 DeadManJoe333  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 2
  • Joined: 17-April 13

Error 1013!

Posted 17 April 2013 - 05:13 PM

Ok so I've plugged in my code to have Luigi collide with platforms and for some reason when I run it not only does the test movie do nothing but I am also getting errors 1013 AND 1084. 1084...makes no sense to me, I can't see how that's causing a problem when I have the bracer in the right place! 1013 is saying that private function scrollStage(); can only be used on class property definitions, wth?!

package
{
	import flash.display.MovieClip
	import flash.events.Event
	import flash.events.KeyboardEvent
	
	public class DocumentMain extends MovieClip
	{
			public var _startMarker:StartMarker;
			public var _player:Player;
			public var _platform:Platform;
			
			private var _vx:Number;
			private var _vy:Number;
			
			public function DocumentMain() :void
			{
			// assign default values
			_startMarker.visible = false;
			_vx = 0;
			_vy = 0;
			
			// set focus for keyboard input
			stage.focus = stage;
			
			// add event listeners
			this.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
			stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
			stage.addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
			}
		
		private function enterFrameHandler(e:Event):void
		{
				// gravitate the player
				_vy += 2;
				
				// move the player
				_player.x += _vx;
				_player.y += _vy;
				
				// process collisions
				processCollisions();
				
				// scroll the stage
				scrollStage();
		}
			
		private function keyDownHandler(e:KeyboardEvent):void
		{
		}
			
		private function keyUpHandler(e:KeyboardEvent):void
		{
		}
			
		private function processCollisions():void
		{
			// when player is falling
			if (_vy > 0)
			{
				// respawn if the player fell off the stage
				if (_player.y > stage.stageHeight)
				{
					_player.x = _startMarker.x;
					_player.y = _startMarker.y;
					_platform.x = 0;
					_platform.y = 0;
					_vy = o;
				}
				// otherwise, process collisions with platforms
				else
				{
				}
			}
			
		private function scrollStage();
		{
		}
	}
}



Is This A Good Question/Topic? 0
  • +

Replies To: Error 1013!

#2 eddiehm  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 76
  • Joined: 09-March 10

Re: Error 1013!

Posted 30 May 2013 - 08:02 PM

There appears to be a missing } for processCollisions().
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1