Right, I have several GameObject types with similar scripts, all of which have an init() function,
my feeble attempt:
function initComponentIfAvail(myObject : GameObject, myComponent : Component){
if(myObject.GetComponent(myComponent))
myObject.GetComponent(myComponent).init();
}
returns the error