Hey everyone.
I am following along with the kerp.net tutorials on box 2d and in his code for the AbriStaticActor (a class) he has put a super. I keep getting this error:
\ArbiStaticActor.as:24: 1007: A super statement can be used only inside class instance
Now he has done it and it is working fine so how come when I go to do it it has this error.
This is the snippet of the code:
public function ArbiStaticActor(parent:DisplayObjectContainer, location:Point, arrayOfCoords:Array);
{
var myBody:b2Body = createBodyFromCoords(arrayOfCoords, location);
var mySprite:Sprite = createSpriteFromCoords(arrayOfCoords, location, parent);
super(mySprite, myBody);
}
So could someone please help.
Also I have this other error were it keeps saying on line 98 :expecting rightbrace before end of program when there is no line 98 of code and I already have the brace correct.
EXAMPLE of my braces at the end of the program:
return arbiBody;
}
}
}
So could someone please help.
Thank You.
I am following along with the kerp.net tutorials on box 2d and in his code for the AbriStaticActor (a class) he has put a super. I keep getting this error:
\ArbiStaticActor.as:24: 1007: A super statement can be used only inside class instance
Now he has done it and it is working fine so how come when I go to do it it has this error.
This is the snippet of the code:
public function ArbiStaticActor(parent:DisplayObjectContainer, location:Point, arrayOfCoords:Array);
{
var myBody:b2Body = createBodyFromCoords(arrayOfCoords, location);
var mySprite:Sprite = createSpriteFromCoords(arrayOfCoords, location, parent);
super(mySprite, myBody);
}
So could someone please help.
Also I have this other error were it keeps saying on line 98 :expecting rightbrace before end of program when there is no line 98 of code and I already have the brace correct.
EXAMPLE of my braces at the end of the program:
return arbiBody;
}
}
}
So could someone please help.
Thank You.