View Single Post
Old November 18th, 2012 (6:27 AM).
Maruno's Avatar
Maruno Maruno is offline
Lead Dev of Pokémon Essentials
Join Date: Jan 2008
Location: England
Posts: 5,167
Originally Posted by mad.array View Post
During the end of round phase in PokeBattle_Battle, I've found something slightly peculiar. Everything runs fine up until

[email protected][i].pbAbilitiesOnSwitchIn(false)' (Line 3372)

This seems to only run through once (it is nested in a 'for i in priority' loop). Subsequently, the next turn starts before things like the flinch effect etc. have finished resetting.

EDIT: I figured it out. Actually, it was posting it which drew my attention to it. [email protected][i]' needs to be changed to i. I can't believe I've been scratching my head over this for the last half an hour!
Yep, that's right. It's because I tend to copy lines of code from place to place, and don't always make sure it works. Different parts of the scripts refer to battlers in different ways, and indeed that end-of-round method refers to them in both ways in different places (sometimes i is a number, sometimes it's the battler itself).
Reply With Quote