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,888
Reaction score
8,591
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,888
Reaction score
8,591
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,888
Reaction score
8,591
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,483
Reaction score
1,491
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,682
Reaction score
15,293
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

I typically ask this on my normal social media channels, but figured there may be good replies here. Anyone got any good horror movie recommendations? I've seen a lot, but I always love getting suggestions! Bonus points if you know which service it is streaming on (in the US) - bring on the spOoooOky!
 After a few distractions (and my annual rough second week of October), I’m getting back on track with my OMGC project.
 Am I overcomplicating it? Yes. Am I going to tone it down? Almost certainly not.
 At least the dialogue stuff is almost done. I need to do the map itself, and then all that’s left is combat.
 Getting there!
Creating 3D CGs for Cutscenes. :kaosalute:

I keep wanting to post every song I make for the game and have to hold back on that because at this rate, I'll have spoiled all the really good stuff lol..

Forum statistics

Threads
115,903
Messages
1,093,848
Members
151,154
Latest member
SwagTorchic
Top