Cannot read property 'apply' of undefined? Window plug-in

Status
Not open for further replies.

Mxrio

Villager
Member
Joined
Jan 10, 2020
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hey I'm trying to create a custom window that will be called on the menu, but whenever I try to push the scene using SceneManager.push(Scene_UpdatedStatus()) it gives me this error.

Screen Shot 2020-08-09 at 4.54.31 PM.png

Code:
Input.keyMapper["69"] = "E";
Input.keyMapper["65"] = "altleft";
Input.keyMapper["68"] = "altright";

function Scene_UpdatedStatus() {
    this.initialize.apply(this, arguments);
}

Scene_UpdatedStatus.prototype = Object.create(Scene_MenuBase.prototype);
Scene_UpdatedStatus.prototype.constructor = Scene_UpdatedStatus;

Scene_UpdatedStatus.prototype.initialize = function() {
    Scene_MenuBase.prototype.initialize.call(this);
};

Scene_UpdatedStatus.prototype.create = function(){
    Scene_MenuBase.prototype.create.call(this);
    this._updatedWindow = new Window_UpdatedStatus(0, 0, 500, 500);
    this.addWindow(this._updatedWindow);
};

Scene_UpdatedStatus.prototype.update = function(){
    if (!this.drawnWindows){
        this._updatedWindow.refresh();
        this.drawnWindows = true;
    }
    
    if (Input.isTriggered("cancel")) {SceneManager.pop();}
    
    if (Input.isTriggered("E")){
        if (!this._updatedWindow._showPersona)
        {
            this._updatedWindow._showPersona = true;
            this.drawnWindows = false;
        }
    }
    
    if (Input.isTriggered("pageup")){
        if (this._updatedWindow._showPersona)
        {
            this._updatedWindow._showPersona = false;
            this.drawnWindows = false;
        }
    }
    
    if (Input.isTriggered("altleft") && $gameParty.members().length > 1){
        //this._updatedWindow.UpdateActors(left);
        this.drawnWindows = false;
    }
    
    if (Input.isTriggered("altright") && $gameParty.members().length > 1){
        //this._updatedWindow.UpdateActors(right);
        this.drawnWindows = false;
    }
};
this is what the code currently looks like, though I'm pretty sure it's just not running anything past the initialize.apply function anyway. Am I missing something? I've just been copying the structure of other scenes found in rpg_scenes.js.
 

Mxrio

Villager
Member
Joined
Jan 10, 2020
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMMV
Nothing makes me feel more like a coder than when I miss something as obvious as a bad function call.

@Solar_Flare thank you
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,522
Reaction score
4,533
First Language
English
Primarily Uses
RMMV

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts


Todo:
Add fog of war
Add enemy indicators
Make window draggable
Optimise map drawing algorithm (5 seconds to load the map you see, so it's a... poo-poo algorithm)

Any suggestions? :kaoblush:
bleh studio hell job haha at least they like it didnt had time to do much laundry tho ;w;'....YES I DO AT LEAST TAKE A SHOWER everyday!
Ami
--- Food Ingredients ---

Hero: Since the Chef are in Hospital,we can't eat his Dish in 3 Days.
F.Mage: What we have to Eat?
M.Healer: Don't worry,we can Eat the Food Ingredients.
Hero & F.Mage
: Really?

(3 Days Later)

Chef: Hi,Guys. I'm Ba---
(Entire Party Collapse After Eat Raw Meat)
Chef: Wha...WHAT GOING ON HERE!!!!!!
So, I've been thinking about all the complaints about the chibi sprites. Is the problem that they're chibi or that they don't match the character art? If I did a series of chibi/SD character art, would people be interested?
Converting a timer plugin from MV to MZ. Now I really start to fell how awesome the new plugin commands are. This really helps create plugin easier than before!

Forum statistics

Threads
102,909
Messages
995,903
Members
134,359
Latest member
thammycatmi
Top