Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.
I changed opps = eachOpponent -> opps = []
battler.eachOpposing {|b| opps.push(b)}
Then replaced idxbattler with battler.index in the following script line.
skill = @battle.pbGetOwnerFromBattlerIndex(battler.index).skill || 0
Still getting the "moves" error though