Window_MenuStatus crashes if game starts with less than 4 members.

My Window_MenuStatus crashes when I start with less than 4 members, because "$gameParty.members()[index]" is undefined. Something puts 1 ("$gameParty.members()[1]"), 2 ("$gameParty.members()[2]") etc. into functions, even tho it does not exist. Probably a loop somewhere, that does not recognize that the game party members don't exist.

Note: I am using yanfly plugins and I edited code. I probably f*cked something up 🙂.
Hi there!
Post the screenshot of the error trace .
Trigger the error, press F8 or F12, go to the console tab, and send a screenshot of the error trace.
have you removed the additional actors from the actor tab or from the starting party setting?
This might be caused by the starting party containing the reference to deleted actors on the actor tab.
you need to remove the default actors from the starting party before you can delete them on the actor tab.

if you forgot that, add actors with placeholder names in the actor tab to make them visible in the starting party window on the system tab, then remove them there before deleting them again in the actor tab.
Hi there!
Post the screenshot of the error trace .
Trigger the error, press F8 or F12, go to the console tab, and send a screenshot of the error trace.
window_menustatus less than 4 member bug report.png

It is not "isBattleMember" that is undefined. It is "actor.isBattleMember" that is not defined. Actor in this case is referencing to "var actor = $gameParty.members()[index]"
have you removed the additional actors from the actor tab or from the starting party setting?
This might be caused by the starting party containing the reference to deleted actors on the actor tab.
you need to remove the default actors from the starting party before you can delete them on the actor tab.

if you forgot that, add actors with placeholder names in the actor tab to make them visible in the starting party window on the system tab, then remove them there before deleting them again in the actor tab.
I am quite sure that u r right. I deleted all of my actors that I used and then I pasted them into id + 250 to make some space. After that I removed empty boxes from the system starting party.

However i replaced every empty actor slot with "delete me" as a placeholder, but since i removed the empty boxes from the "starting party" already, the "delete me" placeholders are still not deletable. And opening the Window_MenuStatus still crashes the game, if I have less than 4 starting party members.
It is "actor.isBattleMember" that is not defined.
not exactly.
the error message tells that "actor" is undefined, or rather the reference that should point to an actor is undefined. if "isBattleMember" were not defined than the engine could not name it.
not exactly.
the error message tells that "actor" is undefined, or rather the reference that should point to an actor is undefined. if "isBattleMember" were not defined than the engine could not name it.
If you read the first description I said: "$gameParty.members()[index]" is undefined. Which is "actor" in this case. But thx for clarifying it.
Sorry for wasting your time guys. I added this as a Plugin:
Code:
Window_MenuStatus.prototype.maxItems = function() {
return $gameParty.maxBattleMembers();
};

That caused the error. Anyway thx for the help! 🙂

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.

Original thread: https://forums.rpgmakerweb.com/threads/window_menustatus-crashes-if-game-starts-with-less-than-4-members.150670/