00:00
00:00
Newgrounds Background Image Theme

kawishinto just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

ArgumentError: Error #1112... Why?

4,858 Views | 3 Replies
New Topic Respond to this Topic

I got this error-

'ArgumentError: Error #1112: Argument count mismatch on class coercion. Expected 1, got 0.'

What does it mean? Can you answer in layman's terms for me?


You could die after reading this. Get ready. Vid 1 ::::: Vid 2 ::::: My Site :::::

BBS Signature

Response to ArgumentError: Error #1112... Why? 2009-07-12 15:23:02


Code plz, I looked it up and it seems like you tried to turn an object into something that it is not.

Like you tried making a ball into a tank for example.


Mibbygames.com

panterA

BBS Signature

Response to ArgumentError: Error #1112... Why? 2009-07-12 15:38:36


It would help if you posted the code that is giving you problems. I can't seem to find out what would cause this error. The Flash docs don't say anything, and I can't find much online (except one case where someone was trying to use the class constructor for a recursive function I believe, which may be your problem).


BBS Signature

Response to ArgumentError: Error #1112... Why? 2009-07-12 15:55:24


As has been said already, code snippet would help. But it sounds like you're doing; for example.

var s:String = String();
var a:Array = Array();
var m:MovieClip = MovieClip();

instead of:

var s:String = new String();
var a:Array = new Array();
var m:MovieClip = new MovieClip();

Calling 'String()' without 'new' is a method for coercing one type to another for example:

var s:String = String(new Array(1,2,3)); // s = "1,2,3"
var i:int = int(1.57); // i = 1