• 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.

[Scripting Question] trainer scripts reseting

11
Posts
5
Years
    • Seen May 19, 2019
    Hi all,
    Im having a strange issue where on a certain route, the scripts for the 2 trainers on said route are being changed back to the script i copied them from whenever I save and try to run the game. whenever i run the game however, i get a separate error for a different route, that says "private method "gsub" called for in nil:nilclass"

    before playtest
    script:pbtrainerintro(:HIKER)
    script:kernel.pbNoticePlayer(get_character(0))
    text: Isn't nature beautiful?
    conditional branch: Script: pbTrainerBattle(:HIKER,"Jeff",_I("Pokemon are part of nature too i suppose..."),false,0,false,0)
    control self switch a=on
    branch end
    script: pbTrainerEnd
    the other is the exact same aside from dialogue changes

    both after saving

    script:pbtrainerintro(:YOUNGSTER)
    script:kernel.pbNoticePlayer(get_character(0))
    text: Isn't nature beautiful?
    conditional branch: Script: pbTrainerBattle(:YOUNGSTER,"Joey",_I("Eat my shorts!"),false,0,false,0)
    control self switch a=on
    branch end
    script: pbTrainerEnd
     

    Poq

    144
    Posts
    6
    Years
    • Seen Aug 28, 2021
    Are there comments in the event? When essentials compiles, it looks for events named Trainer and if they have certain criteria in the comments, it builds a new trainer based off those comments, overwriting any edits to any of the event commands.
     
    Back
    Top