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.

TrollandToad.com
Closed Thread
 
Thread Tools
  #5301    
Old September 24th, 2009 (3:14 PM).
Soul.//Silver's Avatar
Soul.//Silver Soul.//Silver is offline
     
    Join Date: Sep 2007
    Location: Brisbane, Australia
    Age: 24
    Gender: Male
    Nature: Jolly
    Posts: 495
    New problem, I keep getting a syntax error at line 2498 and I have no idea why. I tried deleting a few "ends" but I still kept getting the error.
    HTML Code:
    2483 def pbThrowAndDeflect(ball,targetBattler)
    2484 end
    2485 def pbThrow(ball,shakes,targetBattler)
    2486  @briefmessage=false
    2487  pokeballThrow(ball,shakes,targetBattler)
    2488 end
    2489 def pbThrowSuccess
    2490  if [email protected]
    2491   @briefmessage=false
    2492   $game_system.bgm_play("../ME/PkmRS-Caught.mid")
    2493   frames=(3.5*Graphics.frame_rate).to_i
    2494   frames.times do
    2495    pbGraphicsUpdate
    2496    pbInputUpdate
    2497  end
    2498 end
    2499
    Any help will be appreciated.

    Relevant Advertising!

      #5302    
    Old September 24th, 2009 (3:23 PM).
    Maruno's Avatar
    Maruno Maruno is offline
    Lead Dev of Pokémon Essentials
       
      Join Date: Jan 2008
      Location: England
      Posts: 5,185
      Quote:
      Originally Posted by thepsynergist View Post
      2.) How can you store all of the pokemon that you have in your party to a variable (a.k.a bug catching contest) so that you have no pokemon in your party, and you can call them back by using another script command or something. I want to have my character go into the past, and have no pokemon in his party that he had in the future, just so you can get the right idea. Maybe Maruno or OblivionMew can help me with this...?
      2) I presume you want the player to pick up and use new pokémon after he's (temporarily) lost his old team. Now, looking at the Bug Catching scripts, this catches my eye:

      Code:
           @otherparty=[]
           chosenpkmn=$Trainer.party[@chosenPokemon]
      
           for i in 0...$Trainer.party.length
            if [email protected]
             @otherparty.push($Trainer.party[i])
            end
           end
      
           $Trainer.party=[chosenpkmn]
      The "chosenpkmn" is whichever one you chose to use before you entered the Contest. The "if" statement copies all the information about all the non-chosen pokémon to an array called "@otherparty" (defined as blank at the beginning). Finally, the trainer's party is redefined to be only the chosen pokémon. At the end of the Contest, the rest of the party is added back.

      So that sounds simple enough. Create an array called "@futurepkmn", and when you time travel, do the "if" statement stuff to copy all the party pokémon into it, then say "$Trainer.party=[]" to make it blank.

      The recovery part of the script (that gives you your pokémon back) is equally simple, but you can look for that yourself (hint: search for "@otherparty"). Do (a variation of) that when you want to get your future pokémon back. You can do other things with that array instead, if you want (and can imagine).


      Quote:
      Originally Posted by ryu3000 View Post
      I wanted to make it so that in order to pass certain areas all pokemon had to be at a certain level, (that way you can't just easily use only one pokemon to defeat the gyms, elite 4, and champion). I tried using
      Code:
      $Trainer.party.level
      ,but I can't seem to use it right, I don't know what I'm doing wrong or if that can even help prevent using just one or two pokemon. If that doesn't help is there a way I can do that?
      $Trainer.party[0].level

      That is the level of the leading pokémon in your party (the party pokémon are numbered 0-5 inclusive). After a quick bit of imagining, I came up with the following:

      Code:
      tempvar=0
      for i in 0...$Trainer.party.length-1
        if $Trainer.party[i].level>=42
          tempvar+=1
        end
      end
      if $Trainer.party.length==tempvar
        You may pass.
      else
        You cannot pass.
      end
      Make sure you're happy with figuring out what's going on. If you want a walkthrough of it, ask me in a PM - I'm feeling nice.
        #5303    
      Old September 24th, 2009 (4:18 PM).
      ryu3000's Avatar
      ryu3000 ryu3000 is offline
         
        Join Date: Sep 2009
        Gender: Male
        Posts: 8
        Ah thank you. I'll use that. That makes sense.
          #5304    
        Old September 24th, 2009 (9:00 PM). Edited September 24th, 2009 by taimao.
        taimao taimao is offline
           
          Join Date: Aug 2009
          Gender: Male
          Nature: Quiet
          Posts: 41
          Quote:
          Originally Posted by Soul.//Silver View Post
          New problem, I keep getting a syntax error at line 2498 and I have no idea why. I tried deleting a few "ends" but I still kept getting the error.
          HTML Code:
          2483 def pbThrowAndDeflect(ball,targetBattler)
          2484 end
          2485 def pbThrow(ball,shakes,targetBattler)
          2486  @briefmessage=false
          2487  pokeballThrow(ball,shakes,targetBattler)
          2488 end
          2489 def pbThrowSuccess
          2490  if [email protected]
          2491   @briefmessage=false
          2492   $game_system.bgm_play("../ME/PkmRS-Caught.mid")
          2493   frames=(3.5*Graphics.frame_rate).to_i
          2494   frames.times do
          2495    pbGraphicsUpdate
          2496    pbInputUpdate
          2497  end
          2498 end
          2499
          Any help will be appreciated.
          Looks to me like you might need one more "end" after line 2498; however, I'm new at this so I don't know for sure.
            #5305    
          Old September 24th, 2009 (10:23 PM).
          thepsynergist's Avatar
          thepsynergist thepsynergist is offline
          A Gym Leader, Kyushu Region
             
            Join Date: Mar 2009
            Location: California, USA
            Age: 27
            Gender: Male
            Nature: Adamant
            Posts: 754
            Quote:
            Originally Posted by Maruno View Post
            2) I presume you want the player to pick up and use new pokémon after he's (temporarily) lost his old team. Now, looking at the Bug Catching scripts, this catches my eye:

            Code:
                 @otherparty=[]
                 chosenpkmn=$Trainer.party[@chosenPokemon]
            
                 for i in 0...$Trainer.party.length
                  if [email protected]
                   @otherparty.push($Trainer.party[i])
                  end
                 end
            
                 $Trainer.party=[chosenpkmn]
            The "chosenpkmn" is whichever one you chose to use before you entered the Contest. The "if" statement copies all the information about all the non-chosen pokémon to an array called "@otherparty" (defined as blank at the beginning). Finally, the trainer's party is redefined to be only the chosen pokémon. At the end of the Contest, the rest of the party is added back.

            So that sounds simple enough. Create an array called "@futurepkmn", and when you time travel, do the "if" statement stuff to copy all the party pokémon into it, then say "$Trainer.party=[]" to make it blank.

            The recovery part of the script (that gives you your pokémon back) is equally simple, but you can look for that yourself (hint: search for "@otherparty"). Do (a variation of) that when you want to get your future pokémon back. You can do other things with that array instead, if you want (and can imagine).
            You Maruno are a life saver, that was racking my brain for about a week now, Thx a bunch.
            __________________




            Pokemon Pyrite is now complete, check out the trailer/download link here: https://www.youtube.com/watch?v=X6g5pXPXyV4
              #5306    
            Old September 25th, 2009 (1:34 AM).
            Wildspark's Avatar
            Wildspark Wildspark is offline
               
              Join Date: Sep 2009
              Location: Tokyo, Japan
              Age: 36
              Gender: Male
              Nature: Quirky
              Posts: 8
              Anyone found a workaround yet for the issue with the latest Pokémon Essentials release - that crashes every time a Pokémon evolves?

              I assume it's not just me that's having this problem...
                #5307    
              Old September 25th, 2009 (3:43 AM).
              Ziebart23's Avatar
              Ziebart23 Ziebart23 is offline
                 
                Join Date: Sep 2009
                Posts: 23
                Quote:
                Originally Posted by Wildspark View Post
                Anyone found a workaround yet for the issue with the latest Pokémon Essentials release - that crashes every time a Pokémon evolves?

                I assume it's not just me that's having this problem...
                Well, I haven't gotten that far into my game, but I bet that will be a problem, so can someone help us out?
                __________________
                  #5308    
                Old September 25th, 2009 (7:04 AM).
                Vaskituh Vaskituh is offline
                   
                  Join Date: May 2009
                  Gender:
                  Posts: 91
                  Would it be that hard to make a Caterpillar system close to the Pokemon Heart Gold and Soul Silver one ?
                    #5309    
                  Old September 25th, 2009 (7:08 AM).
                  The Smell's Avatar
                  The Smell The Smell is offline
                  Doof-Man
                     
                    Join Date: Sep 2006
                    Location: Melbourne, Australia
                    Age: 23
                    Gender: Male
                    Nature: Adamant
                    Posts: 212
                    Quote:
                    Originally Posted by Vaskituh View Post
                    Would it be that hard to make a Caterpillar system close to the Pokemon Heart Gold and Soul Silver one ?
                    It'd be a matter of adding a Script that grabs the Pokedex number of the Pokemon that is first in your party, then uses it's Pokedex number to grab a charset and attach to an event that repeats the moves that you do. Then you could script extra stuff so that when you talk to the Pokemon, it does it's cry or something.
                    __________________



                      #5310    
                    Old September 25th, 2009 (8:11 AM). Edited September 25th, 2009 by Vaskituh.
                    Vaskituh Vaskituh is offline
                       
                      Join Date: May 2009
                      Gender:
                      Posts: 91
                      Quote:
                      Originally Posted by The Smell View Post
                      It'd be a matter of adding a Script that grabs the Pokedex number of the Pokemon that is first in your party, then uses it's Pokedex number to grab a charset and attach to an event that repeats the moves that you do. Then you could script extra stuff so that when you talk to the Pokemon, it does it's cry or something.
                      That sounds.. perfect.

                      The thing is, i don't know how to script though

                      But i do have the Pokemon OverWorlds for all the Pokemons, and the only thing that really interested me would be the Pokemon following the Trainer.

                      Here is a Script made by a friend for Pokemon to follow the Trainer, but even i am having some problems understanding it. Can you guys understand it ?

                      Code:
                       
                      TRAIN_ACTOR_TRANSPARENT_SWITCH = false 
                      TRAIN_ACTOR_TRANSPARENT_SWITCH = true 
                       
                      TRAIN_ACTOR_TRANSPARENT_SWITCHES_INDEX = 20 
                       
                      DOWN_LEFT = 1 
                      DOWN_RIGHT = 3 
                      UP_LEFT = 7 
                      UP_RIGHT = 9 
                      JUMP = 5 
                       
                      class Game_Party_Actor > Game_Character 
                      def initialize 
                      super() 
                      @through = true 
                      end 
                      def setup(actor) 
                      if actor != nil 
                      @character_name = actor.character_name 
                      @character_hue = actor.character_hue 
                      else 
                      @character_name = "" 
                      @character_hue = 0 
                      end 
                      @opacity = 255 
                      @blend_type = 0 
                      end 
                      def screen_z(height = 0) 
                      if $game_player.x == @x and $game_player.y == @y 
                      return $game_player.screen_z(height) - 1 
                      end 
                      super(height) 
                      end 
                      def move_down(turn_enabled = true) 
                      if turn_enabled 
                      turn_down 
                      end 
                      if passable?(@x, @y, Input:: DOWN) 
                      turn_down 
                      @y += 1 
                      end 
                      end 
                      def move_left(turn_enabled = true) 
                      # ×ó¤òÏò¤¯ 
                      if turn_enabled 
                      turn_left 
                      end 
                      if passable?(@x, @y, Input::LEFT) 
                      turn_left 
                      @x -= 1 
                      end 
                      end 
                      def move_right(turn_enabled = true) 
                      if turn_enabled 
                      turn_right 
                      end 
                       
                      if passable?(@x, @y, Input::RIGHT) 
                      turn_right 
                      @x += 1 
                      end 
                      end 
                      def move_up(turn_enabled = true) 
                      if turn_enabled 
                      turn_up 
                      end 
                      if passable?(@x, @y, Input::UP) 
                      turn_up 
                      @y -= 1 
                      end 
                      end 
                      def move_lower_left 
                      unless @direction_fix 
                      @direction = (@direction == Input::RIGHT ? Input::LEFT : @direction == Input::UP ? Input:: DOWN : @direction) 
                      end 
                      if (passable?(@x, @y, Input:: DOWN) and passable?(@x, @y + 1, Input::LEFT)) or 
                      (passable?(@x, @y, Input::LEFT) and passable?(@x - 1, @y, Input:: DOWN)) 
                      @x -= 1 
                      @y += 1 
                      end 
                      end 
                      def move_lower_right 
                      unless @direction_fix 
                      @direction = (@direction == Input::LEFT ? Input::RIGHT : @direction == Input::UP ? Input:: DOWN : @direction) 
                      end 
                      if (passable?(@x, @y, Input:: DOWN) and passable?(@x, @y + 1, Input::RIGHT)) or 
                      (passable?(@x, @y, Input::RIGHT) and passable?(@x + 1, @y, Input:: DOWN)) 
                      @x += 1 
                      @y += 1 
                      end 
                      end 
                      def move_upper_left 
                      unless @direction_fix 
                      @direction = (@direction == Input::RIGHT ? Input::LEFT : @direction == Input:: DOWN ? Input::UP : @direction) 
                      end 
                      if (passable?(@x, @y, Input::UP) and passable?(@x, @y - 1, Input::LEFT)) or 
                      (passable?(@x, @y, Input::LEFT) and passable?(@x - 1, @y, Input::UP)) 
                      @x -= 1 
                      @y -= 1 
                      end 
                      end 
                      def move_upper_right 
                      unless @direction_fix 
                      @direction = (@direction == Input::LEFT ? Input::RIGHT : @direction == Input:: DOWN ? Input::UP : @direction) 
                      end 
                      if (passable?(@x, @y, Input::UP) and passable?(@x, @y - 1, Input::RIGHT)) or 
                      (passable?(@x, @y, Input::RIGHT) and passable?(@x + 1, @y, Input::UP)) 
                      @x += 1 
                      @y -= 1 
                      end 
                      end 
                       
                      def set_move_speed(move_speed) 
                      @move_speed = move_speed 
                      end 
                      end 
                       
                      class Spriteset_Map 
                      def setup_actor_character_sprites? 
                      return @setup_actor_character_sprites_flag != nil 
                      end 
                      def setup_actor_character_sprites(characters) 
                      if !setup_actor_character_sprites? 
                      index_game_player = 0 
                      @character_sprites.each_index do |i| 
                      if @character_sprites[i].character.instance_of?(Game_Player) 
                      index_game_player = i 
                      break 
                      end 
                      end 
                      for character in characters.reverse 
                      @character_sprites.unshift( 
                      Sprite_Character.new(@viewport1, character) 
                      ) 
                      end 
                      @setup_actor_character_sprites_flag = true 
                      end 
                      end 
                      end 
                       
                      class Scene_Map 
                      def setup_actor_character_sprites(characters) 
                      @spriteset.setup_actor_character_sprites(characters) 
                      end 
                      end 
                       
                      class Game_Party 
                      def set_transparent_actors(transparent) 
                      @transparent = transparent 
                      end 
                      def setup_actor_character_sprites 
                      if @characters == nil 
                      @characters = [] 
                      for i in 1 .. 4 
                      @characters.push(Game_Party_Actor.new) 
                      end 
                      end 
                      if @actors_chach == nil 
                      @actors_chach = [] 
                      end 
                      if @actors_chach != @actors 
                      @actors_chach = @actors.clone 
                      for i in 1 .. 4 
                      @characters[i - 1].setup(actors[i]) 
                      end 
                      end 
                      if $scene.instance_of?(Scene_Map) 
                      $scene.setup_actor_character_sprites(@characters) 
                      end 
                      end 
                      def update_party_actors 
                      setup_actor_character_sprites 
                      transparent = $game_player.transparent 
                      if transparent == false 
                      if TRAIN_ACTOR_TRANSPARENT_SWITCH 
                      transparent = $game_switches[TRAIN_ACTOR_TRANSPARENT_SWITCHES_INDEX] 
                      else 
                      transparent = $game_player.transparent 
                      end 
                      end 
                      for character in @characters 
                      character.transparent = transparent 
                      character.set_move_speed($game_player.get_move_speed) 
                      character.update 
                      end 
                      end 
                      def moveto_party_actors( x, y ) 
                      setup_actor_character_sprites 
                      for character in @characters 
                      character.moveto( x, y ) 
                      end 
                      if @move_list == nil 
                      @move_list = [] 
                      end 
                      for i in 0 .. 10 
                      @move_list[i] = nil 
                      end 
                      end 
                      def move_party_actors 
                      if @move_list == nil 
                      @move_list = [] 
                      for i in 0 .. 10 
                      @move_list[i] = nil 
                      end 
                      end 
                      @move_list.each_index do |i| 
                      if @characters[i] != nil 
                      case @move_list[i].type 
                      when Input:: DOWN 
                      @characters[i].move_down(@move_list[i].args[0]) 
                      when Input::LEFT 
                      @characters[i].move_left(@move_list[i].args[0]) 
                      when Input::RIGHT 
                      @characters[i].move_right(@move_list[i].args[0]) 
                      when Input::UP 
                      @characters[i].move_up(@move_list[i].args[0]) 
                      when DOWN_LEFT 
                      @characters[i].move_lower_left 
                      when DOWN_RIGHT 
                      @characters[i].move_lower_right 
                      when UP_LEFT 
                      @characters[i].move_upper_left 
                      when UP_RIGHT 
                      @characters[i].move_upper_right 
                      when JUMP 
                      @characters[i].jump(@move_list[i].args[0],@move_list[i].args[1]) 
                      end 
                      end 
                      end 
                      end 
                      class Move_List_Element 
                      def initialize(type,args) 
                      @type = type 
                      @args = args 
                      end 
                      def type() return @type end 
                      def args() return @args end 
                      end 
                      def add_move_list(type,*args) 
                      @move_list.unshift(Move_List_Element.new(type,args)).pop 
                      end 
                      def move_down_party_actors(turn_enabled = true) 
                      move_party_actors 
                      add_move_list(Input:: DOWN,turn_enabled) 
                      end 
                      def move_left_party_actors(turn_enabled = true) 
                      move_party_actors 
                      add_move_list(Input::LEFT,turn_enabled) 
                      end 
                      def move_right_party_actors(turn_enabled = true) 
                      move_party_actors 
                      add_move_list(Input::RIGHT,turn_enabled) 
                      end 
                      def move_up_party_actors(turn_enabled = true) 
                      move_party_actors 
                      add_move_list(Input::UP,turn_enabled) 
                      end 
                      def move_lower_left_party_actors 
                      move_party_actors 
                      add_move_list(DOWN_LEFT) 
                      end 
                      def move_lower_right_party_actors 
                      move_party_actors 
                      add_move_list(DOWN_RIGHT) 
                      end 
                      def move_upper_left_party_actors 
                      move_party_actors 
                      add_move_list(UP_LEFT) 
                      end 
                      def move_upper_right_party_actors 
                      move_party_actors 
                      add_move_list(UP_RIGHT) 
                      end 
                      def jump_party_actors(x_plus, y_plus) 
                      move_party_actors 
                      add_move_list(JUMP,x_plus, y_plus) 
                      end 
                      end 
                       
                      module Game_Player_Module 
                      def update 
                      $game_party.update_party_actors 
                      super 
                      end 
                      def moveto( x, y ) 
                      super 
                      $game_party.moveto_party_actors( x, y ) 
                      end 
                      def move_down(turn_enabled = true) 
                      if passable?(@x, @y, Input:: DOWN) 
                      $game_party.move_down_party_actors(turn_enabled) 
                      end 
                      super(turn_enabled) 
                      end 
                      def move_left(turn_enabled = true) 
                      if passable?(@x, @y, Input::LEFT) 
                      $game_party.move_left_party_actors(turn_enabled) 
                      end 
                      super(turn_enabled) 
                      end 
                      def move_right(turn_enabled = true) 
                      if passable?(@x, @y, Input::RIGHT) 
                      $game_party.move_right_party_actors(turn_enabled) 
                      end 
                      super(turn_enabled) 
                      end 
                      def move_up(turn_enabled = true) 
                      if passable?(@x, @y, Input::UP) 
                      $game_party.move_up_party_actors(turn_enabled) 
                      end 
                      super(turn_enabled) 
                      end 
                      def move_lower_left 
                      if (passable?(@x, @y, Input:: DOWN) and passable?(@x, @y + 1, Input::LEFT)) or 
                      (passable?(@x, @y, Input::LEFT) and passable?(@x - 1, @y, Input:: DOWN)) 
                      $game_party.move_lower_left_party_actors 
                      end 
                      super 
                      end 
                      def move_lower_right 
                      if (passable?(@x, @y, Input:: DOWN) and passable?(@x, @y + 1, Input::RIGHT)) or 
                      (passable?(@x, @y, Input::RIGHT) and passable?(@x + 1, @y, Input:: DOWN)) 
                      $game_party.move_lower_right_party_actors 
                      end 
                      super 
                      end 
                      def move_upper_left 
                      if (passable?(@x, @y, Input::UP) and passable?(@x, @y - 1, Input::LEFT)) or 
                      (passable?(@x, @y, Input::LEFT) and passable?(@x - 1, @y, Input::UP)) 
                      $game_party.move_upper_left_party_actors 
                      end 
                      super 
                      end 
                      def move_upper_right 
                      if (passable?(@x, @y, Input::UP) and passable?(@x, @y - 1, Input::RIGHT)) or 
                      (passable?(@x, @y, Input::RIGHT) and passable?(@x + 1, @y, Input::UP)) 
                      $game_party.move_upper_right_party_actors 
                      end 
                      super 
                      end 
                      def jump(x_plus, y_plus) 
                      new_x = @x + x_plus 
                      new_y = @y + y_plus 
                      if (x_plus == 0 and y_plus == 0) or passable?(new_x, new_y, 0) 
                      $game_party.jump_party_actors(x_plus, y_plus) 
                      end 
                      super(x_plus, y_plus) 
                      end 
                       
                      def get_move_speed 
                      return @move_speed 
                      end 
                      end 
                       
                      #End of Script.
                       
                      class Game_Player 
                      include Game_Player_Module 
                      end
                        #5311    
                      Old September 25th, 2009 (2:25 PM).
                      Soul.//Silver's Avatar
                      Soul.//Silver Soul.//Silver is offline
                         
                        Join Date: Sep 2007
                        Location: Brisbane, Australia
                        Age: 24
                        Gender: Male
                        Nature: Jolly
                        Posts: 495
                        Quote:
                        Originally Posted by taimao View Post
                        Looks to me like you might need one more "end" after line 2498; however, I'm new at this so I don't know for sure.
                        I've tried adding and deleting "end's" but it still gives me the same error. Strange considering its either a blank line or an "end" line that is doing it. Both at the very end of the script.
                          #5312    
                        Old September 25th, 2009 (4:30 PM).
                        Maruno's Avatar
                        Maruno Maruno is offline
                        Lead Dev of Pokémon Essentials
                           
                          Join Date: Jan 2008
                          Location: England
                          Posts: 5,185
                          Quote:
                          Originally Posted by Soul.//Silver View Post
                          New problem, I keep getting a syntax error at line 2498 and I have no idea why. I tried deleting a few "ends" but I still kept getting the error.
                          HTML Code:
                          2483 def pbThrowAndDeflect(ball,targetBattler)
                          2484 end
                          2485 def pbThrow(ball,shakes,targetBattler)
                          2486  @briefmessage=false
                          2487  pokeballThrow(ball,shakes,targetBattler)
                          2488 end
                          2489 def pbThrowSuccess
                          2490  if [email protected]
                          2491   @briefmessage=false
                          2492   $game_system.bgm_play("../ME/PkmRS-Caught.mid")
                          2493   frames=(3.5*Graphics.frame_rate).to_i
                          2494   frames.times do
                          2495    pbGraphicsUpdate
                          2496    pbInputUpdate
                          2497  end
                          2498 end
                          2499
                          Any help will be appreciated.
                          That looks like it's at the very end of PokeBattle_ActualScene (at least, it is in mine, give or take a few lines). I have 4 "end"s in a row at the end of mine (your quoted bit has 2, for comparison).

                          I believe I had this problem a while back, and it turned out the problem was either a missing or an extra "end" much earlier in the class. That missing/extra "end" meant the rest of the defs weren't being read properly, which for some reason translates to a syntax error at the end of the class.

                          Look at whatever you've changed in PokeBattle_ActualScene and see if the number of "end"s match up. I assume you've added something because your line numbering is 30 ahead of mine (February release, unedited).
                            #5313    
                          Old September 26th, 2009 (12:13 AM).
                          Vaskituh Vaskituh is offline
                             
                            Join Date: May 2009
                            Gender:
                            Posts: 91
                            Someone knows how to help me ?
                              #5314    
                            Old September 26th, 2009 (1:11 AM).
                            Short Range's Avatar
                            Short Range Short Range is offline
                            Chargin' mah Solarbeam!
                               
                              Join Date: Jun 2007
                              Location: Australia
                              Nature: Naive
                              Posts: 270
                              In the servers.txt file, it's safe to delete "127.0.0.1:4000,fdsfdsfd" and replace it with your own server, right? ;
                              __________________
                              MSN/E-mail ~ [email protected]

                              Nintendo Wii Code ~ 6691-5507-3921-0167
                              Pokemon Platinum Code ~ 1849-2990-6860

                              Feel free to drop me a line on Wii Message or MSN! :D
                                #5315    
                              Old September 26th, 2009 (1:45 AM). Edited September 26th, 2009 by The Smell.
                              The Smell's Avatar
                              The Smell The Smell is offline
                              Doof-Man
                                 
                                Join Date: Sep 2006
                                Location: Melbourne, Australia
                                Age: 23
                                Gender: Male
                                Nature: Adamant
                                Posts: 212
                                OK, so in the Intro section there is the script:
                                pbShowPicture(2,pbGetPlayerGraphic,1,230,160)

                                I want it to show the graphic, but how can I make it disappear, because when I go into the first Map, the picture stays there...

                                NOTE: I did edit the Intro text and stuff.

                                EDIT: Oops, I realized it makes it count as Picture 2... Never mind guys!
                                __________________



                                  #5316    
                                Old September 26th, 2009 (1:55 AM).
                                Pier Pier is offline
                                   
                                  Join Date: Jun 2009
                                  Location: Oosternijkerk
                                  Gender: Male
                                  Posts: 10
                                  When starting a playtest, i recieve the following massage:

                                  Code:
                                  ---------------------------
                                  Pokémon: Digital invasion
                                  ---------------------------
                                  Script 'PokeBattle_MoveEffects' line 5049: NameError occurred.
                                  
                                  undefined local variable or method `element' for PokeBattle_Move_F5::PokeBattle_Move_11C:Class
                                  ---------------------------
                                  OK   
                                  ---------------------------

                                  What's wrong with my script (posted below)?
                                  Spoiler:
                                  Code:
                                  class PokeBattle_Move_11C < PokeBattle_Move # Aurvandil's Arrow
                                  def pbType(type,attacker,opponent)
                                    [email protected](20)+1
                                    type=0
                                    case element
                                    when 1
                                      type=PBTypes::NORMAL
                                    when 2
                                      type=PBTypes::FIGHTING
                                    when 3
                                      type=PBTypes::FLYING
                                    when 4
                                      type=PBTypes::POISON
                                    when 5
                                      type=PBTypes::GROUND
                                    when 6
                                      type=PBTypes::ROCK
                                    when 7
                                      type=PBTypes::BUG
                                    when 8
                                      type=PBTypes::GHOST
                                    when 9
                                      type=PBTypes::STEEL
                                    when 10
                                      type=PBTypes::FIRE
                                    when 11
                                      type=PBTypes::WATER
                                    when 12
                                      type=PBTypes::GRASS
                                    when 13
                                      type=PBTypes::ELECTRIC
                                    when 14
                                      type=PBTypes::PSYCHIC
                                    when 15
                                      type=PBTypes::ICE
                                    when 16
                                      type=PBTypes::DRAGON
                                    when 17
                                      type=PBTypes::DARK
                                    when 18
                                      type=PBTypes::LIGHT
                                    when 19
                                      type=PBTypes::SPACE
                                    when 20
                                      type=PBTypes::WOOD
                                    end
                                    @battle.pbDisplay(_INTL("The arrow was of the {1} element!",type.pbThis))
                                  end
                                  if element==1 || element==3
                                    def pbBaseDamage(basedmg,attacker,opponent)
                                      return basedmg=75
                                    end
                                  elsif element==2 || element==9 || element==16 || element==20
                                    def pbBaseDamage(basedmg,attacker,opponent)
                                      return basedmg=125
                                    end
                                  elsif element==4
                                    def pbBaseDamage(basedmg,attacker,opponent)
                                      return basedmg=75
                                    end
                                    def pbAdditionalEffect(attacker,opponent)
                                     if !opponent.pbCanPoison?(false)
                                       return false
                                     end
                                     opponent.pbPoison(attacker)
                                     @battle.pbDisplay(_INTL("{1} became poisoned!",opponent.pbThis))
                                     return true
                                   end
                                  elsif element==5 || element==6 ||element==11 || element==18
                                    def pbBaseDamage(basedmg,attacker,opponent)
                                      return basedmg=100
                                    end
                                  elsif element==7
                                    def pbBaseDamage(basedmg,attacker,opponent)
                                      return basedmg=75
                                    end
                                    def pbAdditionalEffect(attacker,opponent)
                                     if !opponent.pbTooLow?(PBStats::SPEED)
                                        opponent.stages[PBStats::SPEED]-=1
                                        @battle.pbCommonAnimation("StatDown",opponent,nil)
                                        @battle.pbDisplay(_INTL("{1}'s Speed fell!",opponent.pbThis))
                                      end
                                    end
                                  elsif element==8
                                    def pbBaseDamage(basedmg,attacker,opponent)
                                      return basedmg=attacker.level
                                    end
                                  elsif element==10
                                    def pbBaseDamage(basedmg,attacker,opponent)
                                      return basedmg=75
                                    end
                                    def pbAdditionalEffect(attacker,opponent)
                                     if !opponent.pbCanBurn?(false)
                                      return false
                                     end
                                     opponent.pbBurn(attacker)
                                     @battle.pbDisplay(_INTL("{1} was burned!",opponent.pbThis))
                                     return true
                                   end
                                  elsif element==12
                                    def pbBaseDamage(basedmg,attacker,opponent)
                                      return basedmg=75
                                    end
                                    def pbAdditionalEffect(attacker,opponent)
                                      if opponent.pbCanSleep?(true)
                                         @battle.pbAnimation(@id,attacker,opponent)
                                         opponent.pbSleep
                                         @battle.pbDisplay(_INTL("{1} went to sleep!",opponent.pbThis))
                                         return 0
                                      end
                                      return -1
                                   end
                                  elsif element==13
                                    def pbBaseDamage(basedmg,attacker,opponent)
                                      return basedmg=75
                                    end
                                    def pbAdditionalEffect(attacker,opponent)
                                     if !opponent.pbCanParalyze?(false)
                                      return false
                                     end
                                     opponent.pbParalyze(attacker)
                                     @battle.pbDisplay(_INTL("{1} was paralyzed!",opponent.pbThis))
                                     return true
                                   end
                                  elsif element==14
                                    def pbBaseDamage(basedmg,attacker,opponent)
                                      return basedmg=75
                                    end
                                    def pbAdditionaleffect(attacker,opponent)
                                    if opponent.pbCanConfuse?(true)
                                       @battle.pbAnimation(@id,attacker,opponent)
                                       opponent.effects[PBEffects::Confusion][email protected](4)
                                       @battle.pbDisplay(_INTL("{1} became confused!",opponent.pbThis))
                                       return 0
                                    end
                                    return -1
                                    end
                                  elsif element==15
                                    def pbBaseDamage(basedmg,attacker,opponent)
                                      return basedmg=75
                                    end
                                    def pbAdditionalEffect(attacker,opponent)
                                     if !opponent.pbCanFreeze?(false)
                                      return false
                                     end
                                     opponent.pbFreeze(attacker)
                                     @battle.pbDisplay(_INTL("{1} was frozen solid!",opponent.pbThis))
                                     return true
                                   end
                                  elsif element==17
                                    def pbBaseDamage(basedmg,attacker,opponent)
                                      return basedmg=75
                                    end
                                    def pbAdditionalEffect(attacker,opponent)
                                    if opponent.ability!=PBAbilities::INNERFOCUS && opponent.effects[PBEffects::Substitute]==0
                                     opponent.effects[PBEffects::Flinch]=true
                                   end
                                  end
                                  elsif element==19
                                    def pbBaseDamage(basedmg,attacker,opponent)
                                      return basedmg=75
                                    end
                                    def pbAdditionalEffect(attacker,opponent)
                                      if !opponent.pbTooLow?(PBStats::SPATK)
                                       opponent.stages[PBStats::SPATK]-=1
                                       @battle.pbCommonAnimation("StatDown",opponent,nil) if !haveanim; haveanim=true
                                       @battle.pbDisplay(_INTL("{1}'s Special Attack fell!",opponent.pbThis))
                                      end
                                      if !opponent.pbTooLow?(PBStats::SPDEF)
                                       opponent.stages[PBStats::SPDEF]-=1
                                       @battle.pbCommonAnimation("StatDown",opponent,nil) if !haveanim; haveanim=true
                                       @battle.pbDisplay(_INTL("{1}'s Special Defense fell!",opponent.pbThis))
                                      end
                                    end
                                  end
                                  end
                                    #5317    
                                  Old September 26th, 2009 (3:19 AM).
                                  Ziebart23's Avatar
                                  Ziebart23 Ziebart23 is offline
                                     
                                    Join Date: Sep 2009
                                    Posts: 23
                                    Well, I guess that I should ask this now: How do I get certain Pokémon to appear in the grass? Let me still tell everyone that I am no expert in this yet, but I will be once I finish my game.
                                    __________________
                                      #5318    
                                    Old September 26th, 2009 (6:05 AM).
                                    Ty 101's Avatar
                                    Ty 101 Ty 101 is offline
                                       
                                      Join Date: Jul 2008
                                      Posts: 526
                                      I want to display a animated gif sprite.
                                      I have never done this before and so I put in this code.
                                      What did I do wrong.

                                      setBitmap("Graphics/Pictures")
                                      GifSprite.new(Male Character)
                                      update


                                      Here is the error:

                                      ---------------------------
                                      Pokemon Sandstone Version
                                      ---------------------------
                                      Exception: RuntimeError

                                      Message: Script error within event 25, map 1 (Seaside Village):

                                      (eval):1:in `pbExecuteScript'undefined method `setBitmap' for #
                                      __________________
                                      Pokemon Forest of Secrets Creator.
                                      Currently in the Drawing Board
                                        #5319    
                                      Old September 26th, 2009 (6:06 AM).
                                      Pitaelitmaster's Avatar
                                      Pitaelitmaster Pitaelitmaster is offline
                                      The Master Of Puppets
                                         
                                        Join Date: Jul 2009
                                        Gender: Male
                                        Posts: 41
                                        Quote:
                                        Originally Posted by Ziebart23 View Post
                                        Well, I guess that I should ask this now: How do I get certain Pokémon to appear in the grass? Let me still tell everyone that I am no expert in this yet, but I will be once I finish my game.

                                        1.Open editor.exe
                                        2.Go to set encounters
                                        3.Then choose new dentisy and choose land
                                        4.After that you click on land and you will see pokemons where you can edit which one you want and what level and how often they will appear.

                                        I think thats about it.
                                        __________________


                                        http://www.pokecommunity.com/showthread.php?p=5126205#post5126205
                                          #5320    
                                        Old September 26th, 2009 (9:46 AM).
                                        Fraot's Avatar
                                        Fraot Fraot is offline
                                        Researcher & Game Developer
                                           
                                          Join Date: Jun 2008
                                          Location: Somewhere on earth...
                                          Gender: Male
                                          Nature: Quiet
                                          Posts: 325
                                          So...
                                          In other words, how do I initialize a move effect? Do you remember my post? did anyone at least read my post? What script should I modify to have my own effects, I never tested them before and I'm having problems at the time I want to test them in battle.
                                          __________________
                                          Pokémon Pure Version. It's gone now. Buh-bye Nohmen Region! Nobody will miss you because no one had the chance to meet you.

                                          And also... a new Megaman X game is coming. Megaman X: Maverick Wars.
                                            #5321    
                                          Old September 26th, 2009 (1:31 PM).
                                          Maruno's Avatar
                                          Maruno Maruno is offline
                                          Lead Dev of Pokémon Essentials
                                             
                                            Join Date: Jan 2008
                                            Location: England
                                            Posts: 5,185
                                            Quote:
                                            Originally Posted by Fraot View Post
                                            Ok guys, i didn't want to ask any more questions here but i have one more. You'll see, I'm making my own move effects and I got this error:

                                            Code:
                                            ---------------------------
                                            Pokémon Topaz Gem
                                            ---------------------------
                                            Exception: NameError
                                            Message: (eval):1:in `pbFromPBMove'uninitialized constant PokeBattle_Move::PokeBattle_Move_115
                                             
                                            PokeBattle_Move:888:in `pbFromPBMove'
                                            PokeBattle_Battler:204:in `eval'
                                            PokeBattle_Move:888:in `pbFromPBMove'
                                            PokeBattle_Battler:204:in `pbInitPokemon'
                                            PokeBattle_Battler:396:in `pbInitialize'
                                            PokeBattle_Battle:707:in `pbStartBattleCore'
                                            PokeBattle_Battle:563:in `pbStartBattle'
                                            PokemonField:485:in `pbWildBattle'
                                            PokemonField:484:in `pbSceneStandby'
                                            PokemonField:486:in `pbWildBattle'
                                             
                                            This exception was logged in errorlog.txt.
                                            Press Ctrl+C to copy this message to the clipboard.
                                            ---------------------------
                                            Ok  
                                            ---------------------------
                                            So, this thing is telling me that I didn't initialize the constant PokeBattle_Move:okeBattle_Move_115.
                                            I added it to the move effects sript and also on the AI, but it still tells me that this is wrong, so how can I initialize that constant?

                                            This move is suposed to call a Fog weather... yes ALL the Fog weather lines are already on the scripts, I have also an ability named "Foggy Sky" that allows you to call it, like Drizzle calls Rain, but I wanna call it from a move named "Fog Rise" too, and the index 115 is suposed to be the next after the 114(Charge Beam's effect).
                                            Those line numbers don't match up with whatever's in my scripts, so I can't analyse much of what may be going on. However, I'll have a guess.

                                            PokeBattle_MoveEffects contains all the different move effects in the game (as you know). Each different effect is a different class, called PokeBattle_Move_XX, where "XX" is a hexadecimal number (from 00 to FF, missing a few because there aren't 256 different move effects in the game).

                                            The correct class, I think, is called by the following line:

                                            Code:
                                            return eval(sprintf("PokeBattle_Move_%02X.new(battle,move)",movedata.function))
                                            Now it looks to me like this only allows for a 2 digit hexadecimal number (%02X), but you're trying to call number "115" - that's three digits. I don't know where you're getting that number 115 from, by the way.

                                            Try renaming the class to "D6", fixing the pbs file moves.txt to use "D6" for that move, and try again.
                                              #5322    
                                            Old September 26th, 2009 (3:25 PM).
                                            Soul.//Silver's Avatar
                                            Soul.//Silver Soul.//Silver is offline
                                               
                                              Join Date: Sep 2007
                                              Location: Brisbane, Australia
                                              Age: 24
                                              Gender: Male
                                              Nature: Jolly
                                              Posts: 495
                                              Quote:
                                              Originally Posted by Maruno View Post
                                              That looks like it's at the very end of PokeBattle_ActualScene (at least, it is in mine, give or take a few lines). I have 4 "end"s in a row at the end of mine (your quoted bit has 2, for comparison).

                                              I believe I had this problem a while back, and it turned out the problem was either a missing or an extra "end" much earlier in the class. That missing/extra "end" meant the rest of the defs weren't being read properly, which for some reason translates to a syntax error at the end of the class.

                                              Look at whatever you've changed in PokeBattle_ActualScene and see if the number of "end"s match up. I assume you've added something because your line numbering is 30 ahead of mine (February release, unedited).
                                              Its still giving me the same error no matter how many ends I add or delete. Really frustrating me as I have no idea what is going on.
                                                #5323    
                                              Old September 26th, 2009 (4:10 PM).
                                              |Maximus|'s Avatar
                                              |Maximus| |Maximus| is offline
                                              I'm back~
                                                 
                                                Join Date: Aug 2007
                                                Age: 21
                                                Nature: Adamant
                                                Posts: 842
                                                Hi, probably a noob question, but I have been using ever since it was released, and this problem has never happened to me.

                                                When the main character walks over to the Professor and talks to him, some messages skip, and others repeat themselves. If you need more detail let me know.
                                                  #5324    
                                                Old September 27th, 2009 (12:59 AM).
                                                Wildspark's Avatar
                                                Wildspark Wildspark is offline
                                                   
                                                  Join Date: Sep 2009
                                                  Location: Tokyo, Japan
                                                  Age: 36
                                                  Gender: Male
                                                  Nature: Quirky
                                                  Posts: 8
                                                  Quote:
                                                  Originally Posted by Wildspark View Post
                                                  Anyone found a workaround yet for the issue with the latest Pokémon Essentials release - that crashes every time a Pokémon evolves?

                                                  I assume it's not just me that's having this problem...
                                                  Quote:
                                                  Originally Posted by Ziebart23 View Post
                                                  Well, I haven't gotten that far into my game, but I bet that will be a problem, so can someone help us out?
                                                  Honestly, I'm surprised that people haven't been more concerned about this Pokémon-don't-evolve thing. I guess we're the only two using the latest Pokémon Essentials release..?

                                                  Anybody who wants to quickly test this, by the way, just has to go outside the starting area, head into the grass, capture a RATTATA and trade it with the guy in the Pokécenter. He gives you a HAUNTER which immediately evolves (Or at least, it's supposed to...)

                                                  Obviously, this is completely ruining any possibility of me actually being able to make a game, so help would be greatly appreciated from one of you clever folks.

                                                  Failing that, does anyone have an older version of Pokémon Essentials that they could send me? The only old version I have has trouble with the audio (PokemonHealing ME doesn't play) and I can't find any archive lists.
                                                    #5325    
                                                  Old September 27th, 2009 (1:33 AM).
                                                  Wichu's Avatar
                                                  Wichu Wichu is offline
                                                  Project Amethyst
                                                     
                                                    Join Date: Sep 2007
                                                    Location: North Herts, England
                                                    Age: 24
                                                    Gender: Male
                                                    Nature: Naive
                                                    Posts: 2,052
                                                    Quote:
                                                    Originally Posted by Maruno View Post
                                                    Those line numbers don't match up with whatever's in my scripts, so I can't analyse much of what may be going on. However, I'll have a guess.

                                                    PokeBattle_MoveEffects contains all the different move effects in the game (as you know). Each different effect is a different class, called PokeBattle_Move_XX, where "XX" is a hexadecimal number (from 00 to FF, missing a few because there aren't 256 different move effects in the game).

                                                    The correct class, I think, is called by the following line:

                                                    Code:
                                                    return eval(sprintf("PokeBattle_Move_%02X.new(battle,move)",movedata.function))
                                                    Now it looks to me like this only allows for a 2 digit hexadecimal number (%02X), but you're trying to call number "115" - that's three digits. I don't know where you're getting that number 115 from, by the way.

                                                    Try renaming the class to "D6", fixing the pbs file moves.txt to use "D6" for that move, and try again.
                                                    %02X means it formats the number to at least 2 digits, padding with 0s. It works fine with 3 digit numbers.
                                                    The problem seems to be with Fraot's script. Fraot: are you sure you spelled the class name correctly? Make sure you didn't put the new move class in the middle of another move class, too.
                                                    __________________
                                                    Closed Thread

                                                    Quick Reply

                                                    Join the conversation!

                                                    Create an account to post a reply in this thread, participate in other discussions, and more!

                                                    Create a PokéCommunity Account

                                                    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 1:44 PM.