• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

[Error] I can't open move selection in battle

7
Posts
4
Years
  • So I don't know how I did this but this is showing in the error message

    Exception: NoMethodError
    Message: undefined method `*' for nil:NilClass

    Backtrace:
    PokeBattle_SceneMenus:377:in `refreshSelection'
    PokeBattle_SceneMenus:370:in `each_with_index'
    PokeBattle_SceneMenus:370:in `each'
    PokeBattle_SceneMenus:370:in `each_with_index'
    PokeBattle_SceneMenus:370:in `refreshSelection'
    PokeBattle_SceneMenus:430:in `refresh'
    PokeBattle_SceneMenus:325:in `battler='
    Scene_Commands:71:in `pbFightMenu'
    Battle_Phase_Command:67:in `pbFightMenu'
    Battle_Phase_Command:215:in `pbCommandPhaseLoop'


    Can you help me ?
     

    StCooler

    Mayst thou thy peace discover.
    9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    So I don't know how I did this but this is showing in the error message

    Exception: NoMethodError
    Message: undefined method `*' for nil:NilClass

    Backtrace:
    PokeBattle_SceneMenus:377:in `refreshSelection'
    PokeBattle_SceneMenus:370:in `each_with_index'
    PokeBattle_SceneMenus:370:in `each'
    PokeBattle_SceneMenus:370:in `each_with_index'
    PokeBattle_SceneMenus:370:in `refreshSelection'
    PokeBattle_SceneMenus:430:in `refresh'
    PokeBattle_SceneMenus:325:in `battler='
    Scene_Commands:71:in `pbFightMenu'
    Battle_Phase_Command:67:in `pbFightMenu'
    Battle_Phase_Command:215:in `pbCommandPhaseLoop'


    Can you help me ?

    Can you tell us your Essentials version?
    Apparently, you were in battle when this happened. Can you tell us if the Pokémon had four moves?
     

    StCooler

    Mayst thou thy peace discover.
    9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    the version is v18.1 and yes the Pokemon had four moves

    What kind of battle? What were your Pokémon and the opponent's? Was it at the start of the battle, in the middle of it?
    Did you install any script that alters battles? ZUD, Mid-battle Dialogue, EBS?
    Can you post the script of the function:
    Code:
    def refreshSelection
    ?
    I mean... Please give more information.
     
    7
    Posts
    4
    Years
  • During this:
    https://imgur.com/a/tuWOwqx

    also, this is the script of the function:
    def refreshSelection
    moves = (@battler) ? @battler.moves : []
    if USE_GRAPHICS
    # Choose appropriate button graphics and z positions
    @buttons.each_with_index do |button,i|
    if !moves || moves.id==0
    @visibility["button_#{i}"] = false
    next
    end
    @visibility["button_#{i}"] = true
    button.src_rect.x = (i==@index) ? @buttonBitmap.width/2 : 0
    button.src_rect.y = moves.type*BUTTON_HEIGHT
    button.z = self.z + ((i==@index) ? 4 : 3)
    end
    end
    refreshMoveData(moves[@index])
    end


    and yes, I have installe Mid-Battle Dialogue
     

    StCooler

    Mayst thou thy peace discover.
    9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    During this:
    https://imgur.com/a/tuWOwqx

    also, this is the script of the function:

    and yes, I have installe Mid-Battle Dialogue

    Paste this code below (you'll just have to remove it when we're done):
    Code:
      def refreshSelection
        begin 
        moves = (@battler) ? @battler.moves : []
        if USE_GRAPHICS
          # Choose appropriate button graphics and z positions
          @buttons.each_with_index do |button,i|
            if !moves[i] || moves[i].id==0
              @visibility["button_#{i}"] = false
              next
            end
            @visibility["button_#{i}"] = true
            button.src_rect.x = (i==@index) ? @buttonBitmap.width/2 : 0
            button.src_rect.y = moves[i].type*BUTTON_HEIGHT
            button.z          = self.z + ((i==@index) ? 4 : 3)
          end
        end
        refreshMoveData(moves[@index])
        rescue Exception => e
          pbMessage("ERROR:")
          moves.each_with_index do |m, i|
            pbMessage(_INTL("{1}: {2}, type: {3}", i, m.name, m.type))
          end 
        raise e 
        end 
      end
    Tell me what the text displays.
     

    StCooler

    Mayst thou thy peace discover.
    9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    "Ecume" doesn't have a type, for some reason.
    Did you add any ability or effect that modify the types of moves?
     
    7
    Posts
    4
    Years
  • I change nothing I think
    727,BUBBLE,Ecume,044,40,WATER,Special,100,30,10,AllNearFoes,0,bef,"A spray of countless bubbles is jetted at the opposing team. It may also lower the targets' Speed stats."
     

    StCooler

    Mayst thou thy peace discover.
    9,301
    Posts
    4
    Years
    • Seen May 5, 2024
    I change nothing I think

    In the class class PokeBattle_Move, in the class:
    Code:
    class PokeBattle_Move
    find the function:
    Code:
      def initialize(battle,move)
    go at the end of it, and before the "end", right after the line @snatched = false, paste this, and tell me if the error happens again.
    Code:
        if !@type
          s = _INTL("Movedata (len: {1}): ", moveData.length)
          s += _INTL("MOVE_FUNCTION_CODE: {1}, {2}", MOVE_FUNCTION_CODE, moveData[MOVE_FUNCTION_CODE])
          s += _INTL("MOVE_BASE_DAMAGE: {1}, {2}", MOVE_BASE_DAMAGE, moveData[MOVE_BASE_DAMAGE])
          s += _INTL("MOVE_TYPE: {1}, {2}", MOVE_TYPE, moveData[MOVE_TYPE])
          s += _INTL("MOVE_CATEGORY: {1}, {2}", MOVE_CATEGORY, moveData[MOVE_CATEGORY])
          s += _INTL("MOVE_ACCURACY: {1}, {2}", MOVE_ACCURACY, moveData[MOVE_ACCURACY])
          s += _INTL("MOVE_EFFECT_CHANCE: {1}, {2}", MOVE_EFFECT_CHANCE, moveData[MOVE_EFFECT_CHANCE])
          s += _INTL("MOVE_TARGET: {1}, {2}", MOVE_TARGET, moveData[MOVE_TARGET])
          s += _INTL("MOVE_PRIORITY: {1}, {2}", MOVE_PRIORITY, moveData[MOVE_PRIORITY])
          s += _INTL("MOVE_FLAGS: {1}, {2}", MOVE_FLAGS, moveData[MOVE_FLAGS])
          
          raise _INTL("move {1} doesn't have a type: {2}", @name, s)
        end
     
    Back
    Top