The PokéCommunity Forums Fan Games Game Development Scripts & Tutorials
Essentials Script Multiple save files 2.2

Scripts & Tutorials This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.


Reply
 
Thread Tools
  #51    
Old December 9th, 2014 (6:20 PM).
p.claydon p.claydon is offline
     
    Join Date: Jan 2011
    Gender: Female
    Posts: 400
    im getting

    Exception: NameError
    Message: uninitialized constant PokemonLoad::LongTextsArrays
    PokemonLoad:625:in `pbStartLoadScreen'
    PokemonLoad:490:in `loop'
    PokemonLoad:869:in `pbStartLoadScreen'
    Main:30:in `main'
    Main:75:in `mainFunctionDebug'
    Main:53:in `mainFunction'
    Main:53:in `pbCriticalCode'
    Main:53:in `mainFunction'
    Main:85
    Main:84:in `loop'

    error when starting a new game scripts added are the pokemon contest edits and thats it
    Reply With Quote

    Relevant Advertising!

      #52    
    Old December 9th, 2014 (7:15 PM).
    mej71's Avatar
    mej71 mej71 is offline
       
      Join Date: Mar 2014
      Location: Omnipresence
      Gender: Male
      Posts: 1,226
      Quote:
      Originally Posted by p.claydon View Post
      im getting

      Exception: NameError
      Message: uninitialized constant PokemonLoad::LongTextsArrays
      PokemonLoad:625:in `pbStartLoadScreen'
      PokemonLoad:490:in `loop'
      PokemonLoad:869:in `pbStartLoadScreen'
      Main:30:in `main'
      Main:75:in `mainFunctionDebug'
      Main:53:in `mainFunction'
      Main:53:in `pbCriticalCode'
      Main:53:in `mainFunction'
      Main:85
      Main:84:in `loop'

      error when starting a new game scripts added are the pokemon contest edits and thats it
      I forgot to remove those before uploading the fix for compressed games. Removed them now, try again.
      Reply With Quote
        #53    
      Old December 10th, 2014 (12:07 PM).
      p.claydon p.claydon is offline
         
        Join Date: Jan 2011
        Gender: Female
        Posts: 400
        ok now getting this error :(

        Exception: TypeError
        Message: no implicit conversion from nil to integer
        PokemonLoad:2557:in `srand'
        PokemonLoad:2557:in `pbStoreSaveSeed'
        PokemonLoad:639:in `pbStartLoadScreen'
        PokemonLoad:490:in `loop'
        PokemonLoad:867:in `pbStartLoadScreen'
        Main:30:in `main'
        Main:75:in `mainFunctionDebug'
        Main:53:in `mainFunction'
        Main:53:in `pbCriticalCode'
        Main:53:in `mainFunction'
        __________________
        Still learning how to sprite but if you want to look at my progress then here you go
        http://pclaydon.deviantart.com/gallery/
        Reply With Quote
          #54    
        Old December 10th, 2014 (12:16 PM).
        mej71's Avatar
        mej71 mej71 is offline
           
          Join Date: Mar 2014
          Location: Omnipresence
          Gender: Male
          Posts: 1,226
          Quote:
          Originally Posted by p.claydon View Post
          ok now getting this error :(

          Exception: TypeError
          Message: no implicit conversion from nil to integer
          PokemonLoad:2557:in `srand'
          PokemonLoad:2557:in `pbStoreSaveSeed'
          PokemonLoad:639:in `pbStartLoadScreen'
          PokemonLoad:490:in `loop'
          PokemonLoad:867:in `pbStartLoadScreen'
          Main:30:in `main'
          Main:75:in `mainFunctionDebug'
          Main:53:in `mainFunction'
          Main:53:in `pbCriticalCode'
          Main:53:in `mainFunction'
          Change the line
          Code:
          pbStoreSaveSeed($game_variables[99])
          to
          Code:
          pbStoreSaveSeed($game_variables[99]) if RESTRICTSAVEACCESS
          Updated in the main script.
          Reply With Quote
            #55    
          Old December 10th, 2014 (1:10 PM).
          p.claydon p.claydon is offline
             
            Join Date: Jan 2011
            Gender: Female
            Posts: 400
            oh i just added == were srand showed and it works
            __________________
            Still learning how to sprite but if you want to look at my progress then here you go
            http://pclaydon.deviantart.com/gallery/
            Reply With Quote
              #56    
            Old December 10th, 2014 (1:38 PM).
            mej71's Avatar
            mej71 mej71 is offline
               
              Join Date: Mar 2014
              Location: Omnipresence
              Gender: Male
              Posts: 1,226
              Quote:
              Originally Posted by p.claydon View Post
              oh i just added == were srand showed and it works
              You have security settings turned off, so that works fine for you I guess. But it won't for anybody using it or who may use it in the future.

              When you don't have $SAVESEED defined,
              Code:
              Kernel.srand == $SAVESEED #=> false
              Which will prevent the security features from working as intended, and stop people from playing their games. You could also have added
              Code:
              return if !RESTRICTSAVEACCESS
              to the beginning of the method and it would do that same thing as my fix.

              Bad, and somewhat messy, programming practice, but
              Code:
              Kernel.srand $SAVESEED
              is the same as
              Code:
              Kernel.srand($SAVESEED)
              Reply With Quote
                #57    
              Old December 10th, 2014 (2:05 PM).
              p.claydon p.claydon is offline
                 
                Join Date: Jan 2011
                Gender: Female
                Posts: 400
                oh fair enought i'll fix later not too important at the moment as long as it works for now
                __________________
                Still learning how to sprite but if you want to look at my progress then here you go
                http://pclaydon.deviantart.com/gallery/
                Reply With Quote
                  #58    
                Old December 12th, 2014 (5:18 PM).
                p.claydon p.claydon is offline
                   
                  Join Date: Jan 2011
                  Gender: Female
                  Posts: 400
                  ok so added the fix you gave and set RESTRICTSAVEACCESS = true
                  but when using GTS each save file maintains the same online id isnt RESTRICTSAVEACCESS = true meant to stop that or have i misunderstood?
                  __________________
                  Still learning how to sprite but if you want to look at my progress then here you go
                  http://pclaydon.deviantart.com/gallery/
                  Reply With Quote
                    #59    
                  Old December 12th, 2014 (10:46 PM).
                  mej71's Avatar
                  mej71 mej71 is offline
                     
                    Join Date: Mar 2014
                    Location: Omnipresence
                    Gender: Male
                    Posts: 1,226
                    Quote:
                    Originally Posted by p.claydon View Post
                    ok so added the fix you gave and set RESTRICTSAVEACCESS = true
                    but when using GTS each save file maintains the same online id isnt RESTRICTSAVEACCESS = true meant to stop that or have i misunderstood?
                    What it's meant to stop is the player from making copies of their files and playing as that, since if they get a shiny in one game then they could normally just copy over their save file and get multiples. Which isn't a problem in a normal game, but with a GTS it kind of like cheating. I haven't formatted it specifically to work with a GTS script if that's what you mean, you'll have to change the id assigning in that script to something different. I assume it stores your id to your game's save file, and not one external place? If not, I would set it up to do so.
                    Reply With Quote
                      #60    
                    Old December 13th, 2014 (2:25 PM).
                    p.claydon p.claydon is offline
                       
                      Join Date: Jan 2011
                      Gender: Female
                      Posts: 400
                      ah ok i ha missunderstood
                      __________________
                      Still learning how to sprite but if you want to look at my progress then here you go
                      http://pclaydon.deviantart.com/gallery/
                      Reply With Quote
                        #61    
                      Old February 2nd, 2015 (1:08 AM).
                      batistatotti batistatotti is offline
                         
                        Join Date: Feb 2015
                        Posts: 7
                        Hii this script is amazing, but i have one problem. I am using the v15.1, the latest (in the post you say that this script works v13+). I have replaced all the files that you say but when i click in New game, appears that:
                        Exception: NameError
                        Message: uninitialized constant PokemonLoad::RESTRICTSAVEACCESS
                        PScreen_Load:639:in `pbStartLoadScreen'
                        PScreen_Load:490:in `loop'
                        PScreen_Load:867:in `pbStartLoadScreen'
                        Main:6:in `main'
                        Main:49:in `mainFunctionDebug'
                        Main:27:in `mainFunction'
                        Main:27:in `pbCriticalCode'
                        Main:27:in `mainFunction'
                        Main:59
                        Main:58:in `loop'

                        Can you help me? Thanks!!
                        Reply With Quote
                          #62    
                        Old February 11th, 2015 (3:03 PM). Edited February 11th, 2015 by Badhaas.
                        Badhaas's Avatar
                        Badhaas Badhaas is offline
                           
                          Join Date: Jul 2013
                          Gender: Male
                          Posts: 119
                          I'm getting 2 errors when using this script in Essentials v14;
                          - The first error is that the game window is half the size of that set in the Settings script. EDIT: Fixed; I removed the option to change screen size, yet your PokemonSystem code didn't take this into account causing the first option to be selected.
                          - The second error is a crash when I click on "Other Save Files". It gives the following error message:
                          Spoiler:
                          Exception: Errno::ENOENT
                          Message: File C:\Users\Username\Saved Games/Game Title/Game.rxdata not found.
                          PokemonLoad:675:in `mtime'
                          PokemonLoad:675:in `pbStartLoadScreen'
                          PokemonLoad:495:in `loop'
                          PokemonLoad:882:in `pbStartLoadScreen'
                          Main:22:in `main'
                          Main:77:in `mainFunctionDebug'
                          Main:55:in `mainFunction'
                          Main:55:in `pbCriticalCode'
                          Main:55:in `mainFunction'
                          Main:87
                          Main:86:in `loop'
                          Main:95


                          Besides that I was wondering if it's possible to allow players to name the save files. It might be a nice feature to add.
                          __________________

                          View my profile page for scripts/tutorials made by me, even ones which aren't posted yet.
                          Currently working on a demo for Tales from the Pokémon World (based on the World of Pokémon project)
                          Reply With Quote
                            #63    
                          Old February 11th, 2015 (6:54 PM).
                          mej71's Avatar
                          mej71 mej71 is offline
                             
                            Join Date: Mar 2014
                            Location: Omnipresence
                            Gender: Male
                            Posts: 1,226
                            Quote:
                            Originally Posted by Badhaas View Post
                            I'm getting 2 errors when using this script in Essentials v14;
                            - The first error is that the game window is half the size of that set in the Settings script. EDIT: Fixed; I removed the option to change screen size, yet your PokemonSystem code didn't take this into account causing the first option to be selected.
                            - The second error is a crash when I click on "Other Save Files". It gives the following error message:
                            Spoiler:
                            Exception: Errno::ENOENT
                            Message: File C:\Users\Username\Saved Games/Game Title/Game.rxdata not found.
                            PokemonLoad:675:in `mtime'
                            PokemonLoad:675:in `pbStartLoadScreen'
                            PokemonLoad:495:in `loop'
                            PokemonLoad:882:in `pbStartLoadScreen'
                            Main:22:in `main'
                            Main:77:in `mainFunctionDebug'
                            Main:55:in `mainFunction'
                            Main:55:in `pbCriticalCode'
                            Main:55:in `mainFunction'
                            Main:87
                            Main:86:in `loop'
                            Main:95


                            Besides that I was wondering if it's possible to allow players to name the save files. It might be a nice feature to add.

                            Well, I fixed the first part, I managed not to notice that lol. But, I'm a bit confused on your second error. The code is this second line

                            Code:
                            if safeExists?(newsavecheck)
                                        t=File.mtime(newsavecheck)
                            I can't seem to reproduce your error. But, see, you shouldn't reach that second line if the file doesn't exist, so I have no idea how this would happen. Unless you managed to delete the file miliseconds after the check somehow.

                            I'm honestly opposed to player named things. This is much easier to process the way it is (to include autosaves and stuff, so getting all the files in a directory would be more difficult with regex functions and whatnot). Easy to save and load this way, and I see very little advantage to naming your files. If you want to know what's on them you can just load them.
                            Reply With Quote
                              #64    
                            Old February 15th, 2015 (9:27 PM).
                            FrostJackP FrostJackP is offline
                               
                              Join Date: Jun 2014
                              Gender: Other
                              Nature: Modest
                              Posts: 19
                              Quote:
                              Originally Posted by batistatotti View Post
                              Hii this script is amazing, but i have one problem. I am using the v15.1, the latest (in the post you say that this script works v13+). I have replaced all the files that you say but when i click in New game, appears that:
                              Exception: NameError
                              Message: uninitialized constant PokemonLoad::RESTRICTSAVEACCESS
                              PScreen_Load:639:in `pbStartLoadScreen'
                              PScreen_Load:490:in `loop'
                              PScreen_Load:867:in `pbStartLoadScreen'
                              Main:6:in `main'
                              Main:49:in `mainFunctionDebug'
                              Main:27:in `mainFunction'
                              Main:27:in `pbCriticalCode'
                              Main:27:in `mainFunction'
                              Main:59
                              Main:58:in `loop'

                              Can you help me? Thanks!!
                              I'm getting this crash too, the only change to the save/load screen is the ones made in the modified version of mobius' quest journal script, which I combined rather easily with this script (it was only a few lines), other than that, I copied exactly from the pastebin, don't know what's wrong
                              __________________
                              My fangame is Pokémon Revival! Check it out here!
                              Reply With Quote
                                #65    
                              Old February 15th, 2015 (9:34 PM).
                              mej71's Avatar
                              mej71 mej71 is offline
                                 
                                Join Date: Mar 2014
                                Location: Omnipresence
                                Gender: Male
                                Posts: 1,226
                                Quote:
                                Originally Posted by FrostJackP View Post
                                I'm getting this crash too, the only change to the save/load screen is the ones made in the modified version of mobius' quest journal script, which I combined rather easily with this script (it was only a few lines), other than that, I copied exactly from the pastebin, don't know what's wrong
                                You both skipped an important step in the instructions. At any rate, I'm taking the security stuff out of this soon. It's rather useless, and seems to do more harm than good.
                                Reply With Quote
                                  #66    
                                Old February 16th, 2015 (12:15 PM). Edited February 16th, 2015 by FrostJackP.
                                FrostJackP FrostJackP is offline
                                   
                                  Join Date: Jun 2014
                                  Gender: Other
                                  Nature: Modest
                                  Posts: 19
                                  Quote:
                                  Originally Posted by mej71 View Post
                                  You both skipped an important step in the instructions. At any rate, I'm taking the security stuff out of this soon. It's rather useless, and seems to do more harm than good.
                                  Oh, duh, don't know how I missed that. And I do think the security feature should be removed, at least from this script, it might be more useful as a separate script

                                  After I did the last step, I started getting this error:
                                  Quote:
                                  [EOFError, "End of file reached", ["Section049:2138:in `oldload'", "Section049:2138:in `load'", "Section133:535:in `pbStartLoadScreen'", "Section133:516:in `open'", "Section133:516:in `pbStartLoadScreen'", "Section133:490:in `loop'", "Section133:869:in `pbStartLoadScreen'", "Section173:21:in `main'", "Section173:75:in `mainFunctionDebug'", "Section173:53:in `mainFunction'", "Section173:53:in `pbCriticalCode'", "Section173:53:in `mainFunction'", "Section173:85", "Section173:84:in `loop'", "Section173:93"]]
                                  If RESTRICTSAVEACCESS is set to true, it will tell me it's a copied save file after this, which it isn't and won't let me start the game, but if it's set to false, the error still shows up, but you can still play
                                  __________________
                                  My fangame is Pokémon Revival! Check it out here!
                                  Reply With Quote
                                    #67    
                                  Old February 16th, 2015 (1:24 PM).
                                  mej71's Avatar
                                  mej71 mej71 is offline
                                     
                                    Join Date: Mar 2014
                                    Location: Omnipresence
                                    Gender: Male
                                    Posts: 1,226
                                    Quote:
                                    Originally Posted by FrostJackP View Post
                                    Oh, duh, don't know how I missed that. And I do think the security feature should be removed, at least from this script, it might be more useful as a separate script

                                    After I did the last step, I started getting this error:

                                    If RESTRICTSAVEACCESS is set to true, it will tell me it's a copied save file after this, which it isn't and won't let me start the game, but if it's set to false, the error still shows up, but you can still play
                                    From the initial post
                                    Quote:
                                    Important note: Previous game files will not work if you use the new secure feature, and they will have to be deleted and restarted. Please tell your players not to delete or edit the file Seed.dat if you use the secure feature, as this will render their game data unplayable in your system. This file is read only, so you won't do it on accident.
                                    It's in bold even.
                                    Reply With Quote
                                      #68    
                                    Old February 16th, 2015 (9:55 PM).
                                    FrostJackP FrostJackP is offline
                                       
                                      Join Date: Jun 2014
                                      Gender: Other
                                      Nature: Modest
                                      Posts: 19
                                      I am using a new save file as well as having the security features turned off
                                      __________________
                                      My fangame is Pokémon Revival! Check it out here!
                                      Reply With Quote
                                        #69    
                                      Old March 1st, 2015 (9:49 PM).
                                      mej71's Avatar
                                      mej71 mej71 is offline
                                         
                                        Join Date: Mar 2014
                                        Location: Omnipresence
                                        Gender: Male
                                        Posts: 1,226
                                        Removed security feature, fixed screen resizing.
                                        Reply With Quote
                                          #70    
                                        Old March 12th, 2015 (9:09 AM). Edited March 12th, 2015 by Savordez.
                                        Savordez's Avatar
                                        Savordez Savordez is offline
                                        How does my profile have over 700 views like seriously
                                           
                                          Join Date: Dec 2013
                                          Location: dunno
                                          Gender: Male
                                          Nature: Relaxed
                                          Posts: 106
                                          The "pbCheckForSeed" part in Main is causing errors. I deleted it and now it runs like normal. Did I actually fix it or screw things up even more? Also, the Other Save Files crash Badhaas is getting happens to me too.

                                          EDIT: Okay, I noticed the error in question is slightly different:
                                          Code:
                                          Exception: Errno::ENOENT
                                          Message: File C:\Users\Joni\Saved Games/Pokémon_ Uncensored Edition/Game.rxdata not found.
                                          PScreen_Load:649:in `mtime'
                                          PScreen_Load:649:in `pbStartLoadScreen'
                                          PScreen_Load:490:in `loop'
                                          PScreen_Load:856:in `pbStartLoadScreen'
                                          Main:21:in `main'
                                          Main:74:in `mainFunctionDebug'
                                          Main:52:in `mainFunction'
                                          Main:52:in `pbCriticalCode'
                                          Main:52:in `mainFunction'
                                          Main:84
                                          __________________
                                          Reply With Quote
                                            #71    
                                          Old March 12th, 2015 (5:37 PM).
                                          mej71's Avatar
                                          mej71 mej71 is offline
                                             
                                            Join Date: Mar 2014
                                            Location: Omnipresence
                                            Gender: Male
                                            Posts: 1,226
                                            Quote:
                                            Originally Posted by Savordez View Post
                                            The "pbCheckForSeed" part in Main is causing errors. I deleted it and now it runs like normal. Did I actually fix it or screw things up even more? Also, the Other Save Files crash Badhaas is getting happens to me too.

                                            EDIT: Okay, I noticed the error in question is slightly different:
                                            Code:
                                            Exception: Errno::ENOENT
                                            Message: File C:\Users\Joni\Saved Games/Pokémon_ Uncensored Edition/Game.rxdata not found.
                                            PScreen_Load:649:in `mtime'
                                            PScreen_Load:649:in `pbStartLoadScreen'
                                            PScreen_Load:490:in `loop'
                                            PScreen_Load:856:in `pbStartLoadScreen'
                                            Main:21:in `main'
                                            Main:74:in `mainFunctionDebug'
                                            Main:52:in `mainFunction'
                                            Main:52:in `pbCriticalCode'
                                            Main:52:in `mainFunction'
                                            Main:84
                                            Yes, that line was supposed to have been removed, I had removed it now. Apologies.

                                            As for the second error, I am still completely unable to replicate it. The error doesn't even make sense

                                            Code:
                                            if safeExists?(newsavecheck)
                                                      hasauto=(safeExists?(newautosavecheck))?true:false
                                                      if hasauto==true
                                                          t=File.mtime(newautosavecheck)
                                                          autosavetime=t.strftime("%c")
                                                        else
                                                          autosavetime=""
                                                      end
                                                      t=File.mtime(newsavecheck)
                                            The red line is where your error is occuring, the error says the file does not exist. However, the line
                                            Code:
                                            if safeExists?(newsavecheck)
                                            already checks if the file exists, so it should not even reach that line. If someone who can actually get this error wants to help me figure it out, that would be great. Maybe a conflict with Wine?
                                            Reply With Quote
                                              #72    
                                            Old March 16th, 2015 (9:54 AM).
                                            ~JV~'s Avatar
                                            ~JV~ ~JV~ is offline
                                            Dev of Pokémon Uranium
                                               
                                              Join Date: Aug 2007
                                              Location: Rio de Janeiro
                                              Age: 24
                                              Nature: Relaxed
                                              Posts: 715
                                              Quote:
                                              Originally Posted by mej71 View Post
                                              Yes, that line was supposed to have been removed, I had removed it now. Apologies.

                                              As for the second error, I am still completely unable to replicate it. The error doesn't even make sense

                                              Code:
                                              if safeExists?(newsavecheck)
                                                        hasauto=(safeExists?(newautosavecheck))?true:false
                                                        if hasauto==true
                                                            t=File.mtime(newautosavecheck)
                                                            autosavetime=t.strftime("%c")
                                                          else
                                                            autosavetime=""
                                                        end
                                                        t=File.mtime(newsavecheck)
                                              The red line is where your error is occuring, the error says the file does not exist. However, the line
                                              Code:
                                              if safeExists?(newsavecheck)
                                              already checks if the file exists, so it should not even reach that line. If someone who can actually get this error wants to help me figure it out, that would be great. Maybe a conflict with Wine?
                                              The error as to do with the accented name folder in the file path, for whatever reason .mtime doesn't like that.
                                              __________________
                                              Reply With Quote
                                                #73    
                                              Old March 17th, 2015 (9:45 PM).
                                              mej71's Avatar
                                              mej71 mej71 is offline
                                                 
                                                Join Date: Mar 2014
                                                Location: Omnipresence
                                                Gender: Male
                                                Posts: 1,226
                                                Okay, so thanks to ~JV~, I've added at least a workable fix for the error Savordez and Badhaas. File.mtime has issues with non-English characters even in the newest version of Ruby, so I really don't know how to fix it for real. This fix is just a rescue that uses the current time instead of the file's mtime. So, time won't be accurate, but at least it's playable.
                                                Reply With Quote
                                                  #74    
                                                Old March 29th, 2015 (11:20 AM).
                                                batistatotti batistatotti is offline
                                                   
                                                  Join Date: Feb 2015
                                                  Posts: 7
                                                  whats graphics are you saying with attatched graphics? Thanks:)
                                                  Reply With Quote
                                                    #75    
                                                  Old April 30th, 2015 (7:46 AM).
                                                  akane159 akane159 is offline
                                                     
                                                    Join Date: Oct 2012
                                                    Gender: Female
                                                    Posts: 72
                                                    hi :D! i add this script to my game and it work,

                                                    Spoiler:


                                                    but when i select "other save files", the show me other saves, but i cant see the name of the save, only show me the space , like this :S

                                                    Spoiler:


                                                    this should be like this ?
                                                    I was not supposed to display the name of the saved game
                                                    Reply With Quote
                                                    Reply

                                                    Quick Reply

                                                    Join the conversation!

                                                    Create an account to post a reply in this thread, participate in other discussions, and more!

                                                    Create a PokéCommunity Account

                                                    Sponsored Links
                                                    Thread Tools

                                                    Posting Rules
                                                    You may not post new threads
                                                    You may not post replies
                                                    You may not post attachments
                                                    You may not edit your posts

                                                    BB code is On
                                                    Smilies are On
                                                    [IMG] code is On
                                                    HTML code is Off

                                                    Forum Jump


                                                    All times are GMT -8. The time now is 8:26 PM.