following code;
String.prototype.myFunction = function() { trace("my function is called"); };
var myString:String = "myString";
myString.myFunction();
causes this error with mtasc compiler:
type error String has no field myFunction
it must be possible to add new functions to a class via prototype.
is there any configuration i can do for mtasc to be able to compile this code?
problem was specifying type information at myString variable definition.
it is compilable and working in that case: