# Strange Error #1063: "Argument count mismatch"

**URL:** <https://forum.kirupa.com/t/strange-error-1063-argument-count-mismatch/293429>\
**Category:** flash\
**Created:** [July 28, 2009, 8:51pm UTC](https://forum.kirupa.com/t/strange-error-1063-argument-count-mismatch/293429 "2009-07-28T20:51:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vathian](https://avatars.discourse-cdn.com/v4/letter/v/c2a13f/32.png) [@Vathian](https://forum.kirupa.com/u/Vathian)\
**Post date:** [July 28, 2009, 8:51pm UTC](https://forum.kirupa.com/t/strange-error-1063-argument-count-mismatch/293429/1 "2009-07-28T20:51:50Z")

</div>

Hello! I am in the middle of a rather frustrating issue…here’s the applicable code!

```auto

var stageRef:Stage;
var keyHolder:KeyHolder;
var lowRandKey:Number;
var lowKeyArray:Array = [//items in here];

public function generateKey()
{
	var randArray:Number = Math.ceil(Math.random()*4);
	
        if(randArray == 1) //lowercase
	{
		lowRandKey = Math.floor(Math.random()*lowKeyArray.length);
		keyHolder = new KeyHolder(stageRef, 370, -20, lowKeyArray[lowRandKey], randArray); 
        }
}

```

And this is the constructor from my KeyHolder class:

```auto

public var startX:Number;
public var startY:Number;
public var stageRef:Stage;
public var key:String;
public var kArray:Number;
		
public function KeyHolder(stageRef:Stage, startX:Number, startY:Number, key:String, kArray:Number)
{
	this.stageRef = stageRef;
	this.startX = startX;
	this.startY = startY;
	this.key = key;
	this.kArray = kArray;
}

```

The code runs just fine and everything is operational except it always throws this error:

“ArgumentError: Error #1063: Argument count mismatch on KeyHolder$iinit(). Expected 5, got 0.”

I don’t understand how it can say it got 0 when the game wouldn’t function without the 5 variables being successfully passed!

Any ideas?
