PDA

View Full Version : 0 arguments expected?



dandylion13
February 3rd, 2009, 03:05 AM
Hello,

Does anyone know why this code:


var subPoints:Point = new Point(subObject.x, subObject.y);

is generating this error?

1136: Incorrect number of arguments. Expected 0.

TheCanadian
February 3rd, 2009, 03:13 AM
I would say that it isn't.

dandylion13
February 3rd, 2009, 03:20 AM
Yes, it's odd! This is the only line preventing the code from compiling.

Krilnon
February 3rd, 2009, 03:21 AM
Perhaps you're not using flash.geom.Point. You could have some other namespace open that has a different Point class.

Otherwise, TheCanadian is probably right unless something crazy is going on.

Valaran
February 3rd, 2009, 03:23 AM
Are you really certain? Can't it be the line below this one or above it? I second TheCanadian, I see no reason why it wouldn't work.

wvxvw
February 3rd, 2009, 03:48 AM
I can imagine you have a movie clip in the library you called Point...

Krilnon
February 3rd, 2009, 03:57 AM
Try:
var subPoints:Point = new flash.geom.Point(subObject.x, subObject.y);

dandylion13
February 3rd, 2009, 01:29 PM
I can imagine you have a movie clip in the library you called Point...

That was it exactly!!!!

Thanks so much everyone!!! That was a killer to debug, you guys are great!

TheCanadian
February 3rd, 2009, 02:10 PM
Props to the solvers.