MV "Cannot read property 'actorId'" error when Removing character in Battle
BMM Archive · July 15, 2026
Original Source
- Original title: MV "Cannot read property 'actorId'" error when Removing character in Battle
- Original author: Kou123
- Original date: January 10, 2022
- Source thread: https://forums.rpgmakerweb.com/threads/cannot-read-property-actorid-error-when-removing-character-in-battle.143803/
- Source forum path: Game Development Engines > RPG Maker Javascript Plugins > Javascript/Plugin Support
Summary
I'm getting this error "Cannot read property 'actorId' of undefined when removing a character during battle. It is a summoned character so when it dies, it automatically remove itself from the party. But whenever that happens, I get this error. Fortunately, I know the cause and it is the script below. It is a script from here https://forums.rpgmakerweb.com/index.php?threads/yr-plugins.69148/ "BattlerChange" is the script name by YoraeRasante. I'll attach the files. If anyone can help fix the script, it would be very helpful. Thanks in advance. var DB_GP_removeActor = Game_Party.prototype.removeActor; Game_Party.prototype.removeActor =...
Archived First Post
It is a script from here https://forums.rpgmakerweb.com/index.php?threads/yr-plugins.69148/ "BattlerChange" is the script name by YoraeRasante. I'll attach the files. If anyone can help fix the script, it would be very helpful. Thanks in advance.
var DB_GP_removeActor = Game_Party.prototype.removeActor;
Game_Party.prototype.removeActor = function(actorId) {
if (this.inBattle()) var i = this.battleMembers().indexOf($gameActors._data[actorId]);
DB_GP_removeActor.call(this, actorId);
if (this.inBattle()) {
SceneManager._scene.actorsToRefresh = SceneManager._scene.actorsToRefresh || [];
for (; i < this.battleMembers().length; i++) {
SceneManager._scene.actorsToRefresh.push(this.battleMembers().actorId());
}
}
Downloads / Referenced Files
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadCreator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
Topic Summary
Loading summary...