error when using an object for example rare candy

6 Replies • 186 Views

Hello dear community, I come from the Discord server at the invitation of Aerun.

I have a mistake when I intend to use a rare candy, potion, or other item from the backpack to a pokemon sometimes.

Nuri Yuri

HostMaster

Your function is supposed to look like this:
    # Function that update the team button when extend_data is correct
    def extend_data_button_update
      apt_detect = @extend_data.open_skill_learn || @extend_data.stone_evolve
      @team_buttons.each do |btn|
        btn.show_item_name
        v = @extend_data.on_pokemon_choice(btn.data, self)
        c = ON_POKEMON_CHOICE_COLOR_MAPPING[v]
        if apt_detect
          message_id = ON_POKEMON_CHOICE_MESSAGE_MAPPING[v]
        else
          message_id = (v ? 140 : 141)
        end
        btn.item_text.load_color(c).text = parse_text(22, message_id)
      end
    end
ln(yo) = <3
Your function is supposed to look like this:
    # Function that update the team button when extend_data is correct
    def extend_data_button_update
      apt_detect = @extend_data.open_skill_learn || @extend_data.stone_evolve
      @team_buttons.each do |btn|
        btn.show_item_name
        v = @extend_data.on_pokemon_choice(btn.data, self)
        c = ON_POKEMON_CHOICE_COLOR_MAPPING[v]
        if apt_detect
          message_id = ON_POKEMON_CHOICE_MESSAGE_MAPPING[v]
        else
          message_id = (v ? 140 : 141)
        end
        btn.item_text.load_color(c).text = parse_text(22, message_id)
      end
    end

Thanks for trying to help me.

Nuri Yuri

HostMaster

Did you edit PSDK scripts ?
It's forbidden to do so. Please update your scripts to .25 version. You can see how it's supposed to look here: https://gitlab.com/pokemonsdk/pokemonsdk/-/tree/development/scripts/01400%20GamePlay/00200%20Party
ln(yo) = <3
I am using version 25.4 downloaded from download.psdk.pokemonworkshop.fr.

The only thing I have done is edit X, Y positions and add some new background text or image.
The scripts are supposed to look the same as those: https://gitlab.com/pokemonsdk/pokemonsdk/-/tree/development/scripts/01400%20GamePlay/00200%20Party

Thank you very much, the error was taking the code of the previous version and replacing it apparently. Something stupid of me.

There was an error while thanking
Thanking...