• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

Pokemon Contests Script 1.5

23
Posts
9
Years
    • Seen Mar 30, 2016
    I honestly don't know, I've never used that. It might, but then again it might not.

    Yes & No , Single Player Contest work but Multiplayer Contest would need to be writen into the coding , and don't ask others to just give it to you. Try coding it 1st , then ask if your still getting errors to see what you should changed or to see what you messed up.
    Lots of Luck ! If you do get this working for Multiplayer please feel free to message me , becouse I my self have issues trying to get this work for Multiplayer.

    The main reason I was asking is because I don't have the time to test it since the guy that was doing the bulk of the scripting for my mmo bailed on me to no life destiny. I'll get around to tinkering with it though, since I do everything myself anyway xD
     
    119
    Posts
    10
    Years
  • Have you tried and it's not working? Or you just haven't tried yet? I have not updated it, but I don't know of any compatibility problems their might be.
    i can verify that this does work on v14 as i have it working 100%
     
    423
    Posts
    13
    Years
    • Seen Aug 31, 2023
    i cant get it working crashes when on summary screen for contest moves and when getting the move list in a contest
     
    423
    Posts
    13
    Years
    • Seen Aug 31, 2023
    yh and i'll send error report now ok so i think ive attached an error log to this post
     
    423
    Posts
    13
    Years
    • Seen Aug 31, 2023
    ok now im getting this error

    Exception: RuntimeError
    Message: Undefined Trainer constant name: 
    Name must consist only of letters, numbers, and
    underscores and can't begin with a number.
    In addition, the name must be defined
    in trainertypes.txt.
    File PBS/trainers.txt, line 1
    

    Compiler:932:in `pbGetConst'
    Compiler:974:in `parseTrainer'
    Compiler:1432:in `pbCompileTrainers'
    Compiler:1430:in `loop'
    Compiler:1532:in `pbCompileTrainers'
    Compiler:4025:in `pbCompileAllData'
    Compiler:4146
     
    1,224
    Posts
    10
    Years
  • ok now im getting this error

    Exception: RuntimeError
    Message: Undefined Trainer constant name: 
    Name must consist only of letters, numbers, and
    underscores and can't begin with a number.
    In addition, the name must be defined
    in trainertypes.txt.
    File PBS/trainers.txt, line 1
    

    Compiler:932:in `pbGetConst'
    Compiler:974:in `parseTrainer'
    Compiler:1432:in `pbCompileTrainers'
    Compiler:1430:in `loop'
    Compiler:1532:in `pbCompileTrainers'
    Compiler:4025:in `pbCompileAllData'
    Compiler:4146

    That has nothing to do with me, you have an error in trainers.txt
     
    423
    Posts
    13
    Years
    • Seen Aug 31, 2023
    odd its the default install

    EDIT

    ok used the vs13 pbs files and works now thx for the help tho
     
    Last edited:

    ShadowFiendZX

    Gym Leader
    59
    Posts
    11
    Years
  • ok now im getting this error

    Exception: RuntimeError
    Message: Undefined Trainer constant name: 
    Name must consist only of letters, numbers, and
    underscores and can't begin with a number.
    In addition, the name must be defined
    in trainertypes.txt.
    File PBS/trainers.txt, line 1
    

    Compiler:932:in `pbGetConst'
    Compiler:974:in `parseTrainer'
    Compiler:1432:in `pbCompileTrainers'
    Compiler:1430:in `loop'
    Compiler:1532:in `pbCompileTrainers'
    Compiler:4025:in `pbCompileAllData'
    Compiler:4146

    I had the same problem. At first I used his whole code for compiler, and got that error. So I got the original, and made the changes he said to. The logic in his changes in the compiler was somewhat broken, so I had to change a few things. I could give you the code in my compiler if you want, since aside from the changes for the contest, it's clean v14.
     
    1,224
    Posts
    10
    Years
  • I had the same problem. At first I used his whole code for compiler, and got that error. So I got the original, and made the changes he said to. The logic in his changes in the compiler was somewhat broken, so I had to change a few things. I could give you the code in my compiler if you want, since aside from the changes for the contest, it's clean v14.

    Broken for v14 or in general? I never had a problem with it, so probably something was changed in the compiler.
     
    1
    Posts
    10
    Years
    • Seen Mar 2, 2021
    when i ran a contest, i got this error on the last move of round 4:

    Exception: RuntimeError
    Message: Script error within event 5, map 2 (Lappet Town):
    Exception: NoMethodError
    Message: Section055:536:in `playTiming'undefined method `pokemon' for 0:Fixnum
    ***Full script:
    pbContest(50,PBSpecies::CHARIZARD,20,PBSpecies::SQUIRTLE,20,PBSpecies::HITMONTOP,20,1)

    Interpreter:243:in `pbExecuteScript'
    PBAnimation:529:in `each'
    PBAnimation:529:in `playTiming'
    PokeContestScene:2763:in `update'
    PokeContestScene:1968:in `pbAnimationCore'
    PokeContestScene:1918:in `pbAnimation'
    PokeContestScene:1914:in `pbSaveShadows'
    PokeContestScene:1920:in `pbAnimation'
    PokeContestScene:450:in `pbTurn'
    PokeContestScene:122:in `pbStartContest'

    Interpreter:276:in `pbExecuteScript'
    Interpreter:1600: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'
     
    1,224
    Posts
    10
    Years
  • when i ran a contest, i got this error on the last move of round 4:

    Exception: RuntimeError
    Message: Script error within event 5, map 2 (Lappet Town):
    Exception: NoMethodError
    Message: Section055:536:in `playTiming'undefined method `pokemon' for 0:Fixnum
    ***Full script:
    pbContest(50,PBSpecies::CHARIZARD,20,PBSpecies::SQUIRTLE,20,PBSpecies::HITMONTOP,20,1)

    Interpreter:243:in `pbExecuteScript'
    PBAnimation:529:in `each'
    PBAnimation:529:in `playTiming'
    PokeContestScene:2763:in `update'
    PokeContestScene:1968:in `pbAnimationCore'
    PokeContestScene:1918:in `pbAnimation'
    PokeContestScene:1914:in `pbSaveShadows'
    PokeContestScene:1920:in `pbAnimation'
    PokeContestScene:450:in `pbTurn'
    PokeContestScene:122:in `pbStartContest'

    Interpreter:276:in `pbExecuteScript'
    Interpreter:1600: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'

    Without me rewriting or adding a lot of things, the best solution right now is to change every instance of pbAnimation(parameters here) to
    Code:
    pbAnimation(@currentmove1,nil,1,0)
    The place where the line is occuring uses user.pokemon , expecting the user part to be an instance of PokemonBattle_Battlers, since I'm just using the animation processes of the battle system. If you use my fix, this shouldn't happen, but it won't play the pokemon's cry when they use a move.

    As for why it doesn't happen until that turn, I have no idea honestly.

    This was written for v13 originally, the difference that causes this issue in v14 is the difference between
    Code:
    #v14
    if i.name && i.name!=""
                  pbSEPlay(i.name,i.volume,i.pitch)
                else
                  poke=(user && user.pokemon) ? user.pokemon : 1
                  name=(pbCryFile(poke) rescue "001Cry")
                  pbSEPlay(name,i.volume,i.pitch)
                end
    and
    Code:
    #v13
    if i.name && i.name!=""
                  pbSEPlay(i.name,i.volume,i.pitch)
                else
                  name=(pbCryFile((user.pokemon rescue 1)) rescue "001Cry")
                  pbSEPlay(name,i.volume,i.pitch)
                end

    Edit: You could revert if you want, but it could cause unexpected consequences, so I'd recommend just using the fix at the top of this post.
     
    Last edited:
    1
    Posts
    10
    Years
    • Seen Mar 2, 2021
    Without me rewriting or adding a lot of things, the best solution right now is to change every instance of pbAnimation(parameters here) to
    Code:
    pbAnimation(@currentmove1,nil,1,0)
    The place where the line is occuring uses user.pokemon , expecting the user part to be an instance of PokemonBattle_Battlers, since I'm just using the animation processes of the battle system. If you use my fix, this shouldn't happen, but it won't play the pokemon's cry when they use a move.

    As for why it doesn't happen until that turn, I have no idea honestly.

    This was written for v13 originally, the difference that causes this issue in v14 is the difference between
    Code:
    #v14
    if i.name && i.name!=""
                  pbSEPlay(i.name,i.volume,i.pitch)
                else
                  poke=(user && user.pokemon) ? user.pokemon : 1
                  name=(pbCryFile(poke) rescue "001Cry")
                  pbSEPlay(name,i.volume,i.pitch)
                end
    and
    Code:
    #v13
    if i.name && i.name!=""
                  pbSEPlay(i.name,i.volume,i.pitch)
                else
                  name=(pbCryFile((user.pokemon rescue 1)) rescue "001Cry")
                  pbSEPlay(name,i.volume,i.pitch)
                end

    You could revert those few lines back to v13 if you want, but I'm not sure what actual advantage the v14 version has.

    Thank you, its working now.
     
    Back
    Top