• 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] PokeBattle_Move Syntax Error??

1
Posts
3
Years
    • Seen Sep 6, 2020
    this might just be me being stupid, but i'd really appreciate some advice on how to fix this-

    Script 'PokeBattle_Move' line 1363: SyntaxError occurred. If I delete that line, then it's 1362. Please help me 😅 I have no idea what's going on

    I can't post images because I'm new, but I'll copy and paste line 1363 and line 1362, and up to the section before it (they're the last lines)

    Code:
    ################################################################################
    # Using the move
    ################################################################################
      def pbOnStartUse(attacker)
        return true
      end
    
      def pbAddTarget(targets,attacker)
      end
    
      def pbDisplayUseMessage(attacker)
      # Return values:
      # -1 if the attack should exit as a failure
      # 0 if the attack should proceed with its effect
      # 1 if the attack should exit as a success
      # 2 if Bide is storing energy
        @battle.pbDisplayBrief(_INTL("{1} used\r\n{2}!",attacker.pbThis,name))
        return 0
      end
    
      def pbShowAnimation(id,attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
        return if !showanimation
        if attacker.effects[PBEffects::ParentalBond]==1
          @battle.pbCommonAnimation("ParentalBond",attacker,opponent)
          return
        end
        @battle.pbAnimation(id,attacker,opponent,hitnum)
      end
    
      def pbOnDamageLost(damage,attacker,opponent)
        # Used by Counter/Mirror Coat/Revenge/Focus Punch/Bide
        type=@type
        type=pbType(type,attacker,opponent)
        if opponent.effects[PBEffects::Bide]>0
          opponent.effects[PBEffects::BideDamage]+=damage
          opponent.effects[PBEffects::BideTarget]=attacker.index
        end
        if @function==0x90 # Hidden Power
          type=getConst(PBTypes,:NORMAL) || 0
        end
        if pbIsPhysical?(type)
          opponent.effects[PBEffects::Counter]=damage
          opponent.effects[PBEffects::CounterTarget]=attacker.index
        elsif pbIsSpecial?(type)
          opponent.effects[PBEffects::MirrorCoat]=damage
          opponent.effects[PBEffects::MirrorCoatTarget]=attacker.index
        end
        opponent.lastHPLost=damage # for Revenge/Focus Punch/Metal Burst
        opponent.tookDamage=true if damage>0 # for Assurance
        opponent.lastAttacker.push(attacker.index) # for Revenge/Metal Burst
      end
    
      def pbMoveFailed(attacker,opponent)
        # Called to determine whether the move failed
        return false 
      end
     end
     

    Attachments

    • good.png
      good.png
      16.9 KB · Views: 7
    Last edited by a moderator:
    233
    Posts
    5
    Years
    • Seen Oct 9, 2023
    This error means that somewhere in the entire script section you're missing an "end" statement. Unfortunately, you'll have to find out where you're missing the "end" yourself. Look for places where you edited that script and make sure every "if", "def", "for", etc. is eventually being closed with an "end". Everything from what you sent in the picture (line 1327 down) looks good, so you'll have to look up from there.
     
    Back
    Top