X Tutup

Darangen

Regular
Regular
Joined
Jun 6, 2013
Messages
83
Reaction score
26
Primarily Uses
"Script 'Window_Selectable' line 49: ZeroDivisionError occurred.

divided by 0"

This keeps happening at the end of a battle.

Line 48-50 is:

  def item_width

    (width - standard_padding * 2 + spacing) / col_max - spacing

  end

 

 

 

It seems that disabling YEA Battle Engine stops the error.  But I'd rather keep it on.
 
Last edited by a moderator:

Darangen

Regular
Regular
Joined
Jun 6, 2013
Messages
83
Reaction score
26
Primarily Uses
Yes, I've got all the YEA compatible script patches running.
 

Archeia

Developer
Staff member
Developer
Joined
Mar 1, 2012
Messages
16,095
Reaction score
17,139
First Language
Filipino
Primarily Uses
RMMZ
Try copying Window_Base again from Luna Engine Base. It works fine with me o_O

Your scripts should look like this:

QXCBGhc.png
 
Last edited by a moderator:

Darangen

Regular
Regular
Joined
Jun 6, 2013
Messages
83
Reaction score
26
Primarily Uses
Still get the error once I turn on YEA Battle Engine :/
 

Archeia

Developer
Staff member
Developer
Joined
Mar 1, 2012
Messages
16,095
Reaction score
17,139
First Language
Filipino
Primarily Uses
RMMZ
Your lines seem wrong from the version I have. Is this Battle Sample?
 

Darangen

Regular
Regular
Joined
Jun 6, 2013
Messages
83
Reaction score
26
Primarily Uses
It is battle sample, but it also happens in game.

My Window_Base lines are the same as your picture.  When I open the script editor after the error occurs it brings me to Window_Selectable line 49, which is the line I put in a previous post.

  def item_width

    (width - standard_padding * 2 + spacing) / col_max - spacing

  end
 

Archeia

Developer
Staff member
Developer
Joined
Mar 1, 2012
Messages
16,095
Reaction score
17,139
First Language
Filipino
Primarily Uses
RMMZ
Try redownloading Battle Sample in Github. It was updated lately.

and I just checked the one in github and it works perfectly.
 
Last edited by a moderator:

Darangen

Regular
Regular
Joined
Jun 6, 2013
Messages
83
Reaction score
26
Primarily Uses
I'm sorry, I thought you meant Battle Test from the database troop menu.  This is from the full Luna Engine on steam.
 

TheoAllen

Self-proclaimed jack of all trades
Regular
Joined
Mar 16, 2012
Messages
7,646
Reaction score
12,691
First Language
Indonesian
Primarily Uses
N/A
This zero division error usually come up when you try to fight a troop with has no member.

Anyway, good luck for the diagnosis
 
Last edited by a moderator:

Archeia

Developer
Staff member
Developer
Joined
Mar 1, 2012
Messages
16,095
Reaction score
17,139
First Language
Filipino
Primarily Uses
RMMZ
The error occurs because of an incompatibility between Yanfly Battle Engine and Window Cursor whenever you win the battle.
It seems to be a special case when you want to go full vanilla and doesn't happen in some projects that uses more Luna scripts.
To fix the error, just add this below YEA: Compatible or anywhere in it if you're experienced in scripting:

#==============================================================================# ■ Window Cursor + YEA: B#==============================================================================class Window_BattleEnemy < Window_Selectable  if $imported["YEL-MenuLuna-CustomCursor"]    def col_max; return [item_max, 1].max; end  endend # Window_BattleEnemyI'm in the process of integrating it to all scripts now and there should be an update soon including more fixes.

This fix shouldn't be used when you're using Enemy Target Window. I shall be updating the Luna Engine files once all issues are resolved that solves this problem.
 
Last edited by a moderator:

Latest Threads

Latest Profile Posts

Twitch stream is live with Resident Evil 9! Feel free to drop by!
1000207302.png
All of the skill/system icons: Done
Pepper hopped up on my bed to snuggle earlier... and now there's grains of kitty litter all over the foot of my bed. Now she's in her own bed fast asleep. Sometimes, I like to wonder what Pepper dreams about... does she dream of chasing her toys? Pouncing on the lizards she sees on her patio? Purring in a sunny window? Receiving pets and scritchies?
Oh no... she's back in my bed.
Really interesting seeing the public be so okay with the placeholder art in Slay the Spire 2. I guess they trust in the potential of the final product, but it would be cool if the general consumer had a better understanding of dev pipelines.
Haven't updated my status in awhile. I'm taking a short break from working on my game because I have a sliiiight burnout,,

Forum statistics

Threads
154,253
Messages
1,407,564
Members
209,655
Latest member
uberpot
Top
X Tutup