GameMaker GMS2 java extension global var

G

game100boy

Guest
Hi. I am making an extension now.
The language is java. I want to use global variable inside java script.

For example)

public class GenericTest
{
public interface TestMath extends Library {
// Foreign functions
public double Add(double a, double b);
public double Cosine(double val);
public void Sort();
public long Log();
}
public static final TestMath MM = (TestMath) Native.loadLibrary("./TestMath.so", TestMath.class);
public double Addto(double a, double b){
return MM.Add(a,b);
}

}

This way, there are no errors, but the game dies immediately. Can't I use global variables? If there is, please tell me how. If not, is there any other way?
 
Top