View Single Post
  #2    
Old August 31st, 2012 (9:39 AM).
Maruno's Avatar
Maruno Maruno is offline
Lead Dev of Pokémon Essentials
     
    Join Date: Jan 2008
    Location: England
    Posts: 5,171
    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.
    __________________
    Go to the Pokémon Essentials Wiki

    | Downloads | Tutorials | Fangames |
    | All Animations Project |

    Follow me on Twitter: @maruno42


    Reply With Quote