How do I resolve 'TypeError: Cannot read property 'expParams' of undefined'

quackgyver

I make retro games for astrojone.com
Veteran
Joined
Jul 16, 2013
Messages
117
Reaction score
26
First Language
English
Primarily Uses
RMMV
When I try to playtest my game, I immediately get the error message "'TypeError: Cannot read property 'expParams' of undefined' ".

The console gives me the following:
rmmz_managers.js:2030 TypeError: Cannot read property 'expParams' of null at Game_Actor.expForLevel (rmmz_objects.js:4151) at Game_Actor.currentLevelExp (rmmz_objects.js:4171) at Game_Actor.initExp (rmmz_objects.js:4163) at Game_Actor.setup (rmmz_objects.js:4066) at Game_Actor.initialize (rmmz_objects.js:4033) at new Game_Actor (rmmz_objects.js:4018) at Game_Actors.actor (rmmz_objects.js:5224) at Game_Party.setupStartingMembers (rmmz_objects.js:5495) at Function.DataManager.setupNewGame (rmmz_managers.js:256) at Scene_Boot.startNormalGame (rmmz_scenes.js:339) SceneManager.catchNormalError @ rmmz_managers.js:2030

How can I resolve this problem?

Thanks in advance.
 

akoniti

Veteran
Veteran
Joined
Mar 4, 2020
Messages
163
Reaction score
145
First Language
English
Primarily Uses
RMMV
Did you by chance delete all of the Actors, or do you still have at least one set up in System -> Actors?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,970
Reaction score
8,616
First Language
German
Primarily Uses
RMMV
basically any "of undefined" means that the system has a reference to something that no longer exists, usually because you deleted it (less likely because a plugin points to a wrong configuration).

in the case of "expParams" that usually is either an actor or a class - for example if you deletze classes and have an actor that still uses one of the deleted classes, or delete an actor that is still referenced in the game or something like that.
 

quackgyver

I make retro games for astrojone.com
Veteran
Joined
Jul 16, 2013
Messages
117
Reaction score
26
First Language
English
Primarily Uses
RMMV
Did you by chance delete all of the Actors, or do you still have at least one set up in System -> Actors?
I have one actor set up:
Screen Shot 2021-07-27 at 21.37.59.png
Screen Shot 2021-07-27 at 21.38.47.png
basically any "of undefined" means that the system has a reference to something that no longer exists, usually because you deleted it (less likely because a plugin points to a wrong configuration).

in the case of "expParams" that usually is either an actor or a class - for example if you deletze classes and have an actor that still uses one of the deleted classes, or delete an actor that is still referenced in the game or something like that.
I can't really find any references to nonexistent Database entries though.

The Classes-section looks fine:
Screen Shot 2021-07-27 at 21.40.21.png
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,970
Reaction score
8,616
First Language
German
Primarily Uses
RMMV
in the system 1 tab of the database, when you click below the actor "test", how many lines can you click on and mark, and how many lines don't get marked when clicked?
 

quackgyver

I make retro games for astrojone.com
Veteran
Joined
Jul 16, 2013
Messages
117
Reaction score
26
First Language
English
Primarily Uses
RMMV
in the system 1 tab of the database, when you click below the actor "test", how many lines can you click on and mark, and how many lines don't get marked when clicked?
I have only one actor in the Starting Party-box, and only one line is selectable in addition to that:

Screen Shot 2021-07-27 at 23.14.27.png

This is normal however, since double-clicking on the empty line below your actor is how you add additional actors.

No lines beyond these ones are clickable.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,970
Reaction score
8,616
First Language
German
Primarily Uses
RMMV
No lines beyond these ones are clickable.
yes, that is correct - but originally there were four actors, and if you delete the actor in the actor tab before removing them here, those three more actors become invisible references that can be clicked.
and that was my first idea as to where the reference that is causing the error came from.

still the error trace says that the engine cannot load the experience formula for an actor.
the experience settings are in the class of the actor.
so one part of the following sequence is somehow missing:

- experience data for a class
- class data for an actor
- actor data

The only thing you can do now is recreate that data until the error goes away.
then you'll know which part is missing and can continue looking for the reference
1) create actor 2-4, name them a,b,c and test.
error goes away? check starting party and anything that might use an actor.
error still there? create classes 2-4 and assign them to the new actors, test.
error still there? check the experience curves for all classes and anything that references them.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,486
Reaction score
1,506
First Language
Spanish
Primarily Uses
RMVXA
"Cannot read property expParams of null"

......and, who is this 'null'?
that should be your first question.

find the line calling to expParams, and IT should be tied to another expression that'd usually return an actor.
in this case, I guess, game_party[something].
if you have only one actor, and the code calls for game_party[something-greater-than-1], then game_party[inexistent-slot] is returning null.
and there's your culprit.

that's *debugging*: identify, retrace, and repair.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,732
Reaction score
15,308
First Language
English
Primarily Uses
RMMV
Put names in your first 8 actor slots, then check the System tab again. If you see any that you don't want there, delete them from the system tab first.

At what point does this happen? When you first launch the game? When you choose New Game or Continue? When you enter a battle? When you open the menu?
 

Latest Threads

Latest Posts

Latest Profile Posts

So got my hearing tested to see if it was the cause of my mishearing what people say. Test showed no problems but talked with the doctor about anxiety and ADHD causing hearing issues and she agreed and also added that some people hear things differently. With my anxiety cause I am in fight or flight I pay attention to all the sounds in the area so body knows when react. Can't pay attention to one source.
Welp, people are trying to quit my team because I can't code. Where's the dancing blob emoji when I need it?

Forum statistics

Threads
116,053
Messages
1,095,328
Members
151,410
Latest member
Reaper73
Top