It may just be too early in the morning for me ... I've got this super simple little script, and it outputs the correct text depending on what scene is loaded, but immediately after it gives me an 'undefined' with no more information. No line number, no "what" is undefined.
Can anyone see what's causing it?
Can anyone see what's causing it?
Code:
whereami = function() {
if (SceneManager.isScene(Scene_Map)) {
console.log('you are on the map');
} else {
console.log('you are not on the map');
}
};
SceneManager.isScene = function(sceneClass) {
return this._scene && this._scene.constructor === sceneClass;
};