RPG MAKER MV Can't Save,,

1709798010114.png

TypeError: Cannot read property 'name' of undefined
at Function.JsonEx._getConstructorName (rpg_core.js:9115)
at Function.JsonEx._encode (rpg_core.js:9035)
at Function.JsonEx._encode (rpg_core.js:9046)
at Function.JsonEx._encode (rpg_core.js:9046)

Please help me???
at Function.JsonEx._encode (rpg_core.js:9046)
at Function.JsonEx.stringify (rpg_core.js:8943)
at Function.DataManager.saveGameWithoutRescue (YEP_ItemCore.js:675)
at Function.DataManager.saveGame (rpg_managers.js:340)
at Scene_Save.onSavefileOk (rpg_scenes.js:1707)
at Window_SavefileList.Window_Selectable.callHandler (rpg_windows.js:902)
DataManager.saveGame @ rpg_managers.js:342
8rpg_managers.js:342 TypeError: this._actors.map is not a function
at Game_Party.allMembers (rpg_objects.js:4795)
at Game_Party.allMembers (SRPG_core.js:2678)
at Game_Party.allMembers (SRPG_BattlePrepare.js:343)
at Game_Party.battleMembers (rpg_objects.js:4801)
at Game_Party.battleMembers (SRPG_core.js:2663)
at Game_Party.charactersForSavefile (rpg_objects.js:5113)
at Game_Party.charactersForSavefile (SRPG_core.js:2690)
at Function.DataManager.makeSavefileInfo (rpg_managers.js:423)
at Function.DataManager.saveGameWithoutRescue (YEP_ItemCore.js:679)
at Function.DataManager.saveGame (rpg_managers.js:340)
The first important thing is actually above that.

See the very top line, where it tells you it's not loading SRPG_StatusWindow because of === in the code?

That means you have invalid JavaScript someplace. It could be in a plugin parameter, it could be in a notetag. It could theoretically be in another plugin that actually has a typo, but usually this is a user mistake.

It's very likely that whatever code is causing that error is throwing everything off when it comes to the saving functions. So you need to find what's causing that.
Is that happening on loading and continuing a savedfile. or on a new game?

have you ever deleted any actor after playing with it?

Because the error itself is most likely an undefined actor (it cannot load the name of the actor if the actor does not exist.
And in this case I suspect that an older savefile still contains an actor that has been deleted since then.
If that is the case you need to delete all savefiles that contain the non-existing actor.
2024-03-14 11 16 34.jpg

There are two SRPG_StatusWindows, When saving the file an error occurred
if not I put this sign "===" then the error is like this

TypeError: this.currentClass is not a function
at Game_Enemy.Game_Actor.equipSlots (YEP_EquipCore.js:428)
at Game_Enemy.equipSlots (SRPG_StatusWindow.js:497)
at window.Window_SrpgStatus.Window_SrpgStatus.drawEquipments (SRPG_StatusWindow.js:435)
at window.Window_SrpgStatus.Window_SrpgStatus.drawContentsEnemy (SRPG_StatusWindow.js:302)
at window.Window_SrpgStatus.Window_SrpgStatus.drawContentsEnemy (chrome-extension://njgcanhfjdabfmnlmpmdedalocpafnhl/js/plugins/SRPG_StatusWindow(patch).js:303:49)
at window.Window_SrpgStatus.Window_SrpgStatus.refresh (SRPG_StatusWindow.js:208)
at window.Window_SrpgStatus.Window_SrpgStatus.refresh (SRPG_AuraSkill.js:102)
at window.Window_SrpgStatus.Window_SrpgStatus.setBattler (SRPG_core.js:4074)
at Scene_Map.update (SRPG_core.js:5308)
at Scene_Map.update (SRPG_core.js:6808)

So I put "==="
so error
2024-03-14 11 36 57.jpg
The first important thing is actually above that.

See the very top line, where it tells you it's not loading SRPG_StatusWindow because of === in the code?

That means you have invalid JavaScript someplace. It could be in a plugin parameter, it could be in a notetag. It could theoretically be in another plugin that actually has a typo, but usually this is a user mistake.

It's very likely that whatever code is causing that error is throwing everything off when it comes to the saving functions. So you need to find what's causing that.
this my link game https://adisas.itch.io/fod
Kalau dirubah gini bagaimana???

JavaScript:
JsonEx._encode = function(value, circular, depth) {
    depth = depth || 0;
    if (++depth >= this.maxDepth) {
        throw new Error('Object too deep');
    }
    var type = Object.prototype.toString.call(value);
    if (type === '[object Object]' || type === '[object Array]') {
        value['@c'] = JsonEx._generateId();

        // Ganti pemanggilan this._getConstructorName(value) dengan "Pelayer" jika this._getConstructorName tidak didefinisikan
        var constructorName;
        if (typeof this._getConstructorName === 'function') {
            constructorName = this._getConstructorName(value);
        } else {
            constructorName = "Pelayer";
        }

        if (constructorName !== 'Object' && constructorName !== 'Array') {
            value['@'] = constructorName;
        }
        for (var key in value) {
            if (value.hasOwnProperty(key) && !key.match(/^@./)) {
                if(value[key] && typeof value[key] === 'object'){
                    if(value[key]['@c']){
                        circular.push([key, value, value[key]]);
                        value[key] = {'@r': value[key]['@c']};
                    }else{
                        value[key] = this._encode(value[key], circular, depth + 1);

                        if(value[key] instanceof Array){
                            //wrap array
                            circular.push([key, value, value[key]]);

                            value[key] = {
                                '@c': value[key]['@c'],
                                '@a': value[key]
                            };
                        }
                    }
                }else{
                    value[key] = this._encode(value[key], circular, depth + 1);
                }
            }
        }
    }
    depth--;
    return value;
};

@Adisas88, please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.


Also this is an English language forum, so please translate your posts to English.
Double-post notice: @Adisas88
Also this is an English language forum, so please translate your posts to English
OK
:XP1:
finally I found the script, I tried to create a new script, with the help of Gemini and GPT.
According to AI, check again if there is a problematic plugin,
Thank you for ATT_Turan, Andar, and slimmmeiske2. have given good advice

Original thread: https://forums.rpgmakerweb.com/threads/rpg-maker-mv-cant-save.166751/