• 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!
  • It's time to vote for your favorite Pokémon Battle Revolution protagonist in our new weekly protagonist poll! Click here to cast your vote and let us know which PBR protagonist you like most.
  • 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.

Trade Expert Troubles

sonicfan7895

Just a dude, I guess
  • 122
    Posts
    14
    Years
    Hello!

    I'm having a bit of trouble trying to get the Trade Expert script (created by Luka S.J.) to function properly in my project.

    For context, I'm using Essentials v16.2, but where I keep running into errors is the script section that determines whether or not the version of Essentials that's running is v17 or not, which is at Line 142 in my case.

    Code:
        pbFadeOutIn(99999){
           [COLOR="Red"]if isVersion17?[/COLOR]
             scene = PokemonParty_Scene.new
             screen = PokemonPartyScreen.new(scene,$Trainer.party)
           else  
             scene = PokemonScreen_Scene.new
             screen = PokemonScreen.new(scene,$Trainer.party)
           end
           if ableProc
             chosen = screen.pbChooseAblePokemon(ableProc,false)      
           else
             screen.pbStartScene(_INTL("Choose a Pokꮯn."),false)
             chosen = screen.pbChoosePokemon
             screen.pbEndScene
           end
        }
        return (chosen >= 0 ? chosen : nil)
      end

    When I try to launch the Trade Expert script in the game, I get this error message:

    Code:
    ---------------------------
    Pokemon Zen
    ---------------------------
    Exception: RuntimeError
    
    Message: Script error within event 7, map 54 (Trade Depot):
    Exception: NoMethodError
    Message: Section180:142:in `givePokemon'undefined method `isVersion17?' for #<TradeExpert:0x1261c680>
    
    ***Full script:
    tradeExpert
    
    Interpreter:243:in `pbExecuteScript'
    Trade Expert:141:in `pbFadeOutIn'
    Trade Expert:141:in `givePokemon'
    Trade Expert:33:in `initialize'
    Trade Expert:204:in `new'
    Trade Expert:204:in `tradeExpert'
    (eval):1:in `pbExecuteScript'
    Interpreter:1606:in `eval'
    Interpreter:243:in `pbExecuteScript'
    Interpreter:1606:in `command_355'
    
    
    Interpreter:276:in `pbExecuteScript'
    Interpreter:1606: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'

    I'm aware this is probably a super easy fix that I just can't see in front of me at the moment, but it seems to me that there is no method of "isVersion17?" anywhere to call on. But it's just a random guess at this point.

    Any help would be greatly appreciated!

    Thanks in advance!
     
    Did you try to create the def in Settings script?
    Code:
    def isVersion17?
      return true
    end

    Or return false, IDK... Just to test.
     
    Back
    Top