Yanfly BattleEngineCore ("TypeError: Cannot read property of 'scope' of null")

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
2,520
Reaction score
1,655
First Language
English
Primarily Uses
RMMV
Still need help resolving this.


This error only seems to show up whenever the party is defeated, but the enemy has another move to make - like, if the enemy can do 2 attacks during its turn, but kills the party on the first attack. The error shows up while the damage pop-up from the first attack is still showing, so before the next attack is even initiated. This error prevents the Game Over message and screen to appear.


TypeError
Cannot read property of 'scope' of null


This error occurs with only the Yanfly BattleEngineCore enabled.
 
Last edited by a moderator:

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,643
Reaction score
420
First Language
Portuguese
Primarily Uses
RMMV
Does it also happen in a new project without external plugins?
 
Last edited by a moderator:

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,643
Reaction score
420
First Language
Portuguese
Primarily Uses
RMMV
So the problem is probably one of your plugins.
It could be something the author themselves didn't notice, or it could be caused by an update on the maker after the release of the plugin.
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
What makes an enemy attack twice in the same turn?


You could do something that remove all enemies actions whenever the whole party is defeated or make the actors immortal until the next turn but visually it might not be what you want.
 

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
2,520
Reaction score
1,655
First Language
English
Primarily Uses
RMMV
So the problem is probably one of your plugins.
It could be something the author themselves didn't notice, or it could be caused by an update on the maker after the release of the plugin.


So I should go down the list of plugins until I find out which one causes it?
 

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
2,520
Reaction score
1,655
First Language
English
Primarily Uses
RMMV
What makes an enemy attack twice in the same turn?


You could do something that remove all enemies actions whenever the whole party is defeated or make the actors immortal until the next turn but visually it might not be what you want.


I use common events that forces them to do another action. I already tried doing something that calls the Game Over screen when all party members are defeated in the common event that the attack of the enemy uses, but I still get the error.
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
It is probably doable to avoid this error by changing your common events by putting variables that if all party members are dead do nothing else force action.


I'm guessing it's Yanfly Target Core that causes the error, getting an edit will be next to impossible and Yanfly will not consider that a bug(let's not get into that...).


Of course, you can always spend money but it could leads to other bugs.


Try some things and if you want me to take a look you can screenshot me your CE and I'll try to make something for you.
 

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
2,520
Reaction score
1,655
First Language
English
Primarily Uses
RMMV
It is probably doable to avoid this error by changing your common events by putting variables that if all party members are dead do nothing else force action.


I'm guessing it's Yanfly Target Core that causes the error, getting an edit will be next to impossible and Yanfly will not consider that a bug(let's not get into that...).


Of course, you can always spend money but it could leads to other bugs.


Try some things and if you want me to take a look you can screenshot me your CE and I'll try to make something for you.


I just went through my plugins, and I found I can keep everything on, except Yanfly's BattleEngineCore to keep the error from happening. Keeping the BattleEngineCore on, but the plugins that require it off, doesn't make it go away, so it's definitely the BattleEngineCore.


I shortened the common event that's called upon use of the skill to show the part where it forces another attack. At the top of the event, it calls for the Game Over check, which I made to check if all the party members are dead, and if so, to call the Game Over screen.


The conditional branch basically does this: the enemy always attacks at least 3 times in a row, and after that its changes of attacking again that same turn grow smaller.


 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
The force actions still happen even with the gameover inside the Game Over check CE?


If so, l would try to put inside the gameover check CE a switch on if the game over should occur, conditional branch:


At the beginning on your main CE with all the force actions inside,      If switch ON: jump to label abc


At the very end, on that same CE, put the label abc. gameover should occur automatically without you needing to put it there.


If the error still occur, it must be because of some other force action somewhere.
 
Last edited by a moderator:

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
2,520
Reaction score
1,655
First Language
English
Primarily Uses
RMMV
Never mind, it worked because he ran out of attacks. It's still happening. I checked, and the error screen occurs while the damage pop-up is still visible, so before the next attack is even initiated.
 
Last edited by a moderator:

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,643
Reaction score
420
First Language
Portuguese
Primarily Uses
RMMV
Yanfly will not consider that a bug(let's not get into that...).
I disagree, let us get into that.


Because it was confirmed it is caused by one of his plugins, even if not Target Core, and he apparently uses no plugin to do it, just eventing, so it is a but. If he can reproduce it in a new project with just the plugin causing the problem and the required ones for said one, why would Yanfly not consider it a bug?
 

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
2,520
Reaction score
1,655
First Language
English
Primarily Uses
RMMV
I disagree, let us get into that.


Because it was confirmed it is caused by one of his plugins, even if not Target Core, and he apparently uses no plugin to do it, just eventing, so it is a but. If he can reproduce it in a new project with just the plugin causing the problem and the required ones for said one, why would Yanfly not consider it a bug?


Yeah, I just tried it in a completely new project, with only the BattleEngineCore plugin, and I get the same error when the enemy is made to do another attack after the party is wiped.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,528
Reaction score
14,261
First Language
English
Primarily Uses
RMVXA
I've moved this thread to Plug-In Support. Please be sure to post your threads in the correct forum next time. Thank you.
 

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
2,520
Reaction score
1,655
First Language
English
Primarily Uses
RMMV
Still need help resolving this.
 

shockra

Slightly Crazy Programmer
Veteran
Joined
Feb 16, 2016
Messages
444
Reaction score
208
First Language
English
Primarily Uses
RMMV
I've gotten an error message similar to that before.  It means that the variable 'scope' is supposed to find an array that either doesn't exist or isn't an array.  I think the problem is that you're attempting to do something in the common event that can't be done during the attack.  The attack may work better if you did something with Yanfly's Skill Core.  An attack like this can probably be done with Lunatic Mode, maybe in combination with action sequences and a well-built loop...maybe?  I'm thinking for the loop, create a var right before it that increases after each attack in the loop, then when the check fails, break out.  This can replace the common event so that the error won't occur.
 

Milennin

"With a bang and a boom!"
Veteran
Joined
Feb 7, 2013
Messages
2,520
Reaction score
1,655
First Language
English
Primarily Uses
RMMV
@shockra, if it needs to be done with Lunatic Mode, I*m going to need help with it, as I'm not familiar with how writing code works. Is there no way to force-stop the common event from running when all party members are dead?
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,049
Messages
1,018,546
Members
137,835
Latest member
yetisteven
Top