Does anyone see what I’m doing wrong here? I’ve created a class which I try to call variables from using a different javascript.
GameInfo.js
static class Player {
static var loggedIn : boolean;
static var username : String;
static var health : Int;
}
MainMenu.js
function Start(){
GameInfo.Player.loggedIn = false;
}
Error
NullReferenceException: Object reference not set to an instance of an object
Boo.Lang.Runtime.RuntimeServices.GetDispatcher (System.Object target, System.String cacheKeyName, System.Type cacheKeyTypes, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory)
Boo.Lang.Runtime.RuntimeServices.GetDispatcher (System.Object target, System.Object args, System.String cacheKeyName, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory)
Boo.Lang.Runtime.RuntimeServices.SetProperty (System.Object target, System.String name, System.Object value)
MainMenu+$Start$172+$.MoveNext () (at Assets/Project/Scripts/Network/MainMenu.js:107)