I'm trying to write a library that contains a few classes. One of them needs to use an instance of one of the other classes in the library. My question is: how do I create the instance?
I've tried things like this:
Code: Select all
myclass_one class {
...
}
myclass_two class {
inst_once = myclass_one(); // Here I want to create the instance of class 1, but I receive a compile error
var1 = null;
....
}
In particular, when I put the same code in main.nut of the AI, rather than the main.nut of a library, it will compile and run.
Any ideas?