Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.

Reply
 
Thread Tools
  #1    
Old December 23rd, 2012 (6:01 AM).
Sero's Avatar
Sero Sero is offline
私はセクシーです
     
    Join Date: Nov 2008
    Location: 'Merica
    Gender: Male
    Posts: 82
    I'm trying to set up a battle with a Darmanitan w/ zen mode but each time I turn on the switch to activate the modifier, I get this error:

    Code:
    ---------------------------
    Pokémon
    ---------------------------
    Exception: RuntimeError
    
    Message: Script error within event 1, map 113 (Raiken Mountain):
    
    Exception: NameError
    
    Message: Section086:26undefined local variable or method `poke' for nil:NilClass
    
    ***Full script:
    
    pbWildBattle(PBSpecies::DARMANITAN,25,18,true,false)
    
    
    Interpreter:243:in `pbExecuteScript'
    
    PokemonEncounterModifiers:23:in `call'
    
    PBEvent:54:in `trigger'
    
    PBEvent:49:in `each'
    
    PBEvent:49:in `trigger'
    
    PokemonField:928:in `pbGenerateWildPokemon'
    
    PokemonField:952:in `pbWildBattle'
    
    (eval):1:in `pbExecuteScript'
    
    Interpreter:1599:in `eval'
    
    Interpreter:243:in `pbExecuteScript'
    
    
    
    Interpreter:276:in `pbExecuteScript'
    
    Interpreter:1599:in `command_355'
    
    Interpreter:494:in `execute_command'
    
    Interpreter:193:in `update'
    
    Interpreter:106:in `loop'
    
    Interpreter:198:in `update'
    
    Scene_Map:103:in `update'
    
    Scene_Map:101:in `loop'
    
    Scene_Map:114:in `update'
    
    Scene_Map:68:in `main'
    
    
    
    This exception was logged in 
    
    C:\Users\KwesiD\Saved Games/Pokémon/errorlog.txt.
    
    Press Ctrl+C to copy this message to the clipboard.
    ---------------------------
    OK   
    ---------------------------
    It works fine without the modifier switch.
    Reply With Quote

    Relevant Advertising!

      #2    
    Old December 23rd, 2012 (6:49 AM).
    Maruno's Avatar
    Maruno Maruno is offline
    Lead Dev of Pokémon Essentials
       
      Join Date: Jan 2008
      Location: England
      Posts: 5,171
      So you've added some code that causes an error, but you won't show us that code to actually let us help?
      __________________
      Go to the Pokémon Essentials Wiki

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

      Follow me on Twitter: @maruno42


      Reply With Quote
        #3    
      Old December 23rd, 2012 (7:28 AM).
      Sero's Avatar
      Sero Sero is offline
      私はセクシーです
         
        Join Date: Nov 2008
        Location: 'Merica
        Gender: Male
        Posts: 82
        Sorry.
        I called the battle using pbWildBattle(PBSpecies::DARMANITAN,25,18,true,false) and in PokemonEncounterModifiers I added
        Code:
        Events.onWildPokemonCreate+=proc {|sender,e|
           pokemon=e[0]
           if $game_switches[66]
             poke.setAbility(2)
           end
        }
        I also tried the shiny modifier that uses switch #30 that was already in essentials and it works without any problems.
        Reply With Quote
          #4    
        Old December 23rd, 2012 (7:31 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 Sero View Post
          Sorry.
          I called the battle using pbWildBattle(PBSpecies::DARMANITAN,25,18,true,false) and in PokemonEncounterModifiers I added
          Code:
          Events.onWildPokemonCreate+=proc {|sender,e|
             pokemon=e[0]
             if $game_switches[66]
               poke.setAbility(2)
             end
          }
          I also tried the shiny modifier that uses switch #30 that was already in essentials and it works without any problems.
          Those two red words should be the same.
          __________________
          Go to the Pokémon Essentials Wiki

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

          Follow me on Twitter: @maruno42


          Reply With Quote
            #5    
          Old December 23rd, 2012 (10:02 AM).
          Sero's Avatar
          Sero Sero is offline
          私はセクシーです
             
            Join Date: Nov 2008
            Location: 'Merica
            Gender: Male
            Posts: 82
            Thanks. I copied and pasted from the wiki and it had poke.setAbility,but it works now.
            Reply With Quote
            Reply
            Quick Reply

            Sponsored Links
            Thread Tools

            Posting Rules
            You may not post new threads
            You may not post replies
            You may not post attachments
            You may not edit your posts

            BB code is On
            Smilies are On
            [IMG] code is On
            HTML code is Off

            Forum Jump


            All times are GMT -8. The time now is 4:14 PM.