- 56
- Posts
- 10
- Years
- Seen Jul 8, 2023
So, I had gen VI pokemon in the game, the abilities, the moves, etc. I forgot to add the effects, so I copied the scripts I needed from the gen IV project and then my game keeps giving me errors that I haven't had before (seems to be something with crafty shield):
---------------------------
Pokemon Essentials
---------------------------
Exception: RuntimeError
Message: Script error within event 2, map 21 (House 5):
Exception: NameError
Message: Section074: 16in `initialize'uninitialized constant PBEffects::CraftyShield
***Full script:
pbTrainerBattle(PBTrainers::TEAMCOMETGRUNT,"Ronald",_I("Beaten by a newb..."),false,0, false)
Interpreter:243:in `pbExecuteScript'
PokeBattle_Battle:332:in `new'
PokeBattle_Battle:332:in `initialize'
PTrainer_NPCTrainers:319:in `new'
PTrainer_NPCTrainers:319:in `pbTrainerBattle'
(eval): 1in `pbExecuteScript'
Interpreter:794:in `eval'
Interpreter:243:in `pbExecuteScript'
Interpreter:794:in `command_111'
Interpreter:320:in `execute_command'
Interpreter:276:in `pbExecuteScript'
Interpreter:794:in `command_111'
Interpreter:320:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:115:in `update'
Scene_Map:113:in `loop'
Scene_Map:126:in `update'
Scene_Map:68:in `main'
Crafty Shield Code:
################################################################################
# Crafty Shield
################################################################################
class PokeBattle_Move_137 < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
if attacker.pbOwnSide.effects[PBEffects::CraftyShield]
@battle.pbDisplay(_INTL("But it failed!"))
return -1
end
pbShowAnimation(@id,attacker,nil,hitnum,alltargets,showanimation)
attacker.pbOwnSide.effects[PBEffects::CraftyShield]=true
@battle.pbDisplay(_INTL("Crafty Shield protected your team!",attacker.pbThis))
return 0
end
end
---------------------------
Pokemon Essentials
---------------------------
Exception: RuntimeError
Message: Script error within event 2, map 21 (House 5):
Exception: NameError
Message: Section074: 16in `initialize'uninitialized constant PBEffects::CraftyShield
***Full script:
pbTrainerBattle(PBTrainers::TEAMCOMETGRUNT,"Ronald",_I("Beaten by a newb..."),false,0, false)
Interpreter:243:in `pbExecuteScript'
PokeBattle_Battle:332:in `new'
PokeBattle_Battle:332:in `initialize'
PTrainer_NPCTrainers:319:in `new'
PTrainer_NPCTrainers:319:in `pbTrainerBattle'
(eval): 1in `pbExecuteScript'
Interpreter:794:in `eval'
Interpreter:243:in `pbExecuteScript'
Interpreter:794:in `command_111'
Interpreter:320:in `execute_command'
Interpreter:276:in `pbExecuteScript'
Interpreter:794:in `command_111'
Interpreter:320:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:115:in `update'
Scene_Map:113:in `loop'
Scene_Map:126:in `update'
Scene_Map:68:in `main'
Crafty Shield Code:
################################################################################
# Crafty Shield
################################################################################
class PokeBattle_Move_137 < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
if attacker.pbOwnSide.effects[PBEffects::CraftyShield]
@battle.pbDisplay(_INTL("But it failed!"))
return -1
end
pbShowAnimation(@id,attacker,nil,hitnum,alltargets,showanimation)
attacker.pbOwnSide.effects[PBEffects::CraftyShield]=true
@battle.pbDisplay(_INTL("Crafty Shield protected your team!",attacker.pbThis))
return 0
end
end