• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Error] Crash when selling at a mart

  • 1
    Posts
    3
    Years
    • Seen Jan 29, 2023
    I am making a fan game and I have several plugins installed to improve numerous things. However, I noticed that the game now crashes when I try to sell anything. This happens when I select the sell option at a default mart.

    Here is what the errorlog says about it.
    Spoiler:


    Does EBDX or v19.1 hotfixes add any required arguments to the mart system? Even the marts in the base essentials area are crashing. I don't really know where to start with this.

    Also here is every plugin I have installed and links to all of their download pages. If that is helpful in any way.
    Spoiler:


    Thank you. Also if there is any problem with a plugin I have installed that is causing this and there is no solution other than removing or replacing it, I would like an alternative, if possible. Again, thank you for reading.
     
    Thank you. Also if there is any problem with a plugin I have installed that is causing this and there is no solution other than removing or replacing it, I would like an alternative, if possible. Again, thank you for reading.

    So, from what I am seeing, this is a bug within the "Bag Screen with Interactable Party" plugin. Basically, in Essentials V19, you have this function: (class PokemonBag_Scene, in the file 016_UI/007_UI_Bag)

    Code:
      def pbStartScene(bag,choosing=false,filterproc=nil,resetpocket=true)
        # Code...
      end

    but in Bag Screen with Interactable Party, it is rewritten as:

    Code:
      def pbStartScene(bag,party,choosing=false,filterproc=nil,resetpocket=true)
        # Code...
      end

    The difference here, is that the former takes ONE mandatory argument (+ 3 optional arguments) while the latter takes TWO mandatory arguments (+ the same 3 optional). By the way, changing the number of arguments of a function from a framework (here, a function from Essentials) is very dangerous because the function is likely used elsewhere in the code, with the right positioning of arguments. If you rewrite this, you're likely breaking everything, and this is what is happening here.

    This is a bug you should report to the author of the "Bag Screen with Interactable Party" script (link this thread if you need).

    As a quickfix, I suggest you do something like this. In the script of Bag Screen with Interactable Party, replace:

    Code:
      def pbStartScene(bag,party,choosing=false,filterproc=nil,resetpocket=true)
        @viewport = Viewport.new(0,0,Graphics.width,Graphics.height)
        @viewport.z = 99999
        @bag        = bag
        @choosing   = choosing
        @filterproc = filterproc
        @party      = party

    with

    Code:
      def pbStartScene(bag,choosing=false,filterproc=nil,resetpocket=true)
        @viewport = Viewport.new(0,0,Graphics.width,Graphics.height)
        @viewport.z = 99999
        @bag        = bag
        @choosing   = choosing
        @filterproc = filterproc
        @party      = $Trainer.party

    Basically I'm removing the mandatory argument and replacing it with a direct reference to the most "usual" case, when the party to display is the player's party.
     
    Back
    Top