Syntax error in custom surf variant

TheDarkRattata

Rookie
Member
Joined
Apr 24, 2017
Posts
7
Hi everyone,
I've been playing around trying to add a rocky walk on Rhyhorn like in XY, and I've added all the script in but I get a syntax error on one of my lines. I know its probably really simple but I cannot for the life of me see where the error is.

def pbRhyhorn
return false if $game_player.pbFacingEvent
return false if $game_player.pbHasDependentEvents?
move = getID(PBMoves,:BULLDOZE)
movefinder = pbCheckMove(move)
if !pbCheckHiddenMoveBadge(BADGE_FOR_RHYHORN,false) || (!$DEBUG && !movefinder)
return false
end
if pbConfirmMessage(_INTL("The ground is rocky...\nWould you like to ride Rhyhorn?))
speciesname = (movefinder) ? movefinder.name : $Trainer.name
pbMessage(_INTL("{1} used {2}!",speciesname,PBMoves.getName(move))) #This is the line with the error
pbCancelVehicles
pbHiddenMoveAnimation(movefinder)
surfbgm = pbGetMetadata(0,MetadataRhyhornBGM)
pbCueBGM(Rhyhornbgm,0.5) if rhyhornbgm
pbStartRhyhorn
return true
end
return false
end

If someone could please explain what's wrong with it, I would appreciate it so much.
Thanks!
 

TechSkylander1518

Wiki Dweeb
Member
Joined
Mar 24, 2017
Posts
382
pbMessage(_INTL("{1} used {2}!",speciesname,PBMoves.getName(move)))
The weird thing is, I checked this with a text comparison with the code for surf, and this line is exactly identical, so I don't see how this could have a syntax error when it works just fine in surf.

I tried copy+pasting surf's code and changing the relevant parts, maybe try pasting this code in and see if that works?
Ruby:
def pbRhyhorn
  return false if $game_player.pbFacingEvent
  return false if $game_player.pbHasDependentEvents?
  move = getID(PBMoves,:BULLDOZE)
  movefinder = pbCheckMove(move)
  if !pbCheckHiddenMoveBadge(BADGE_FOR_RHYHORN,false) || (!$DEBUG && !movefinder)
    return false
  end
  if pbConfirmMessage(_INTL("The ground is rocky...\nWould you like to ride Rhyhorn? "))
    speciesname = (movefinder) ? movefinder.name : $Trainer.name
    pbMessage(_INTL("{1} used {2}!",speciesname,PBMoves.getName(move)))
    pbCancelVehicles
    pbHiddenMoveAnimation(movefinder)
    surfbgm = pbGetMetadata(0,MetadataSurfBGM)
    pbCueBGM(Rhyhornbgm,0.5) if surfbgm
    pbStartRhyhorn
    return true
  end
  return false
end
 
Top