toastywoasty

Warper
Member
Joined
May 30, 2022
Messages
4
Reaction score
1
First Language
english
Primarily Uses
Other
Ik this isn't a shocker but idk much about code ;-;
I'm getting this error message after i try to load any existing saves? I use the DataManager.saveGame(1) command.

The console reads:
TypeError: Cannot read property 'name' of null
at Function.AudioManager.playBgm (rpg_managers.js:1180)
at Game_System.onAfterLoad (rpg_objects.js:239)
at Scene_Load.terminate (rpg_scenes.js:1745)
at Function.SceneManager.changeScene (rpg_managers.js:1998)
at Function.SceneManager.updateMain (rpg_managers.js:1982)
at Function.SceneManager.update (rpg_managers.js:1907)

(theres more if i expand it but idk if that's anything helpful)
 

TESTOSTERONE

Nosey aren't ya?
Regular
Joined
Feb 11, 2017
Messages
497
Reaction score
2,573
First Language
English
Primarily Uses
RMMV
Did you delete a song from your project?
 

Andar

Regular
Regular
Joined
Mar 5, 2013
Messages
39,310
Reaction score
11,490
First Language
German
Primarily Uses
RMMV
Basically all "of null" means that the engine was given a reference that does not exist.

If this happens on loading a savefile, then that means that the savefile contains this reference and is now incompatible to your current project.
In general either because the plugins changed, or a database reference was deleted, or a file was deleted and so on.

In your case it seems to be some data from the audio manager, most likely the BGM that was active when the game was saved.
 
Last edited:

toastywoasty

Warper
Member
Joined
May 30, 2022
Messages
4
Reaction score
1
First Language
english
Primarily Uses
Other
Basically all "of null" means that the engine was given a reference that does not exist.

If this happens on loading a savefile, then that means that the savefile contains this reference and is now incompatible to your current project.
In general either because the plugins changed, or a database reference was deleted, or a file was deleted and so on.

In your case it seems to be some data from the audio manager, most likely the BGM that was active when the game was saved.
I'm honestly rlly confused ab it, cuz i can create a new game, leave, and immediately continue without changing anything, and it happens
 

Andar

Regular
Regular
Joined
Mar 5, 2013
Messages
39,310
Reaction score
11,490
First Language
German
Primarily Uses
RMMV
i can create a new game, leave, and immediately continue without changing anything, and it happens
In that case, something in your plugins broke the save/load sequences.
That is admittedly a rarer case, but can happen as well.


We need to see full screenshots of your entire plugin manager with all your plugins and their order to check what might have caused this
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
5,031
Reaction score
4,372
First Language
EN
Primarily Uses
RMMZ
I'm guessing you haven't used the correct "save game" script call: it's more than just DataManager.saveGame(1).

Here's an example (for RMMV) that does different things on save success/fail:

// Save to slot 4; on success/failure, play suitable sounds $gameSystem.onBeforeSave(); if (DataManager.saveGame(4)) { StorageManager.cleanBackup(4); SoundManager.playSave(); } else { SoundManager.playBuzzer(); }
$gameSystem.onBeforeSave() records various things, including the current BGM/BGS, so that they can be restored on load.

(This example was copied from the MV / MZ Script Call List.)
 

toastywoasty

Warper
Member
Joined
May 30, 2022
Messages
4
Reaction score
1
First Language
english
Primarily Uses
Other
Thank you so much ;-; I had that code but there was a small typo or a missing parentheses or something idfk but tysm i love u for this
I'm guessing you haven't used the correct "save game" script call: it's more than just DataManager.saveGame(1).

Here's an example (for RMMV) that does different things on save success/fail:

// Save to slot 4; on success/failure, play suitable sounds $gameSystem.onBeforeSave(); if (DataManager.saveGame(4)) { StorageManager.cleanBackup(4); SoundManager.playSave(); } else { SoundManager.playBuzzer(); }

$gameSystem.onBeforeSave() records various things, including the current BGM/BGS, so that they can be restored on load.

(This example was copied from the MV / MZ Script Call List.)
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
5,031
Reaction score
4,372
First Language
EN
Primarily Uses
RMMZ
No worries, it's very easy to make typos when writing code! Happy RPG Making~ :kaojoy:
 

Latest Profile Posts

I'm pretty sure me watching Netflix while having sushi just led to me eating the tail of my tempura shrimp.
1696004095642.png
...and now he even makes resources, too! xD
OMG Y'all. I found an alternate Google Drive I 100% forgot I had. All my crusty old game files from 2014 (when I signed up) are in there. When I like...maybe actually make a prototype thread it's gonna be so much fun taking everyone down my memory lane.
We are at the finish line!!! Thank you COMMUNITY!!!
GameCompletion.jpg
Well, my cat died. Just had a feeling something was off, and went to check.
Someone abandoned her a while ago when she was pregnant, and she wandered into my yard.
Took her to the vet, and did all the usual stuff, making sure she had all the shots and no one was looking for her.
She had the kittens. I kept 1, and found a home for the rest. (Continued because of the limit)

Forum statistics

Threads
134,902
Messages
1,251,741
Members
177,721
Latest member
binamshelanro
Top