View Single Post
  #2    
Old August 31st, 2012, 09:39 AM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
Quote:
Originally Posted by Black Temple Gaurdian View Post
So I implimented a new weather type, which compiles nicely. However, the inducing move causes an error an compile attempt. What am I doing wrong?
Code:
class PokeBattle_Move_140 < PokeBattle_Move
  def pbEffect(attacker,opponent)
    if @battle.weather==PBWeather::DARKNESS
      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    elsif @battle.weather==PBWeather::GENTLEBREEZE
      @battle.pbDisplay(_INTL("{1} Does not want to disrupt the Gentle Breeze", attacker.pbThis))
      return -1
    else
      @battle.weather=PBWeather::DARKNESS
      @battle.weatherduration=5
      @battle.pbDisplay(_INTL("Darkness descended upon the field!"))
      return 0
    end
  end
end
Three little missing letters.
__________________
Reply With Quote