Thread: Save all accounts command

Results 1 to 10 of 10
  1. #1 Save all accounts command 
    Member
    Join Date
    Jul 2012
    Posts
    126
    Thanks given
    2
    Thanks received
    0
    Rep Power
    0
    Does anyone know how to add a save all accounts command, if you do please reply thanks
    Reply With Quote  
     

  2. #2  
    Member
    Join Date
    Jul 2012
    Posts
    126
    Thanks given
    2
    Thanks received
    0
    Rep Power
    0
    Doesn't anyone know how to do this?
    Reply With Quote  
     

  3. #3  
    Spoonfeed Me Bitch
    AddictivePkz's Avatar
    Join Date
    Jun 2012
    Age
    28
    Posts
    733
    Thanks given
    79
    Thanks received
    51
    Rep Power
    0
    Your really annoying.. You either bump your thread every hour , or re post the entire thread every hour.... try
    Code:
    if(playerCommand.startsWith("save") && c.playerRights == 3) {
    			for(Player p : PlayerHandler.players) {
    			if(p == null)
    			continue;	
    			PlayerSave.saveGame((Client)p);
    			}
    Quote Originally Posted by Fakeblitz View Post
    What does [PI] mean? (sorry i am used to 503+)
    And what base is this?
    Reply With Quote  
     

  4. #4  
    Member
    Join Date
    Jul 2012
    Posts
    126
    Thanks given
    2
    Thanks received
    0
    Rep Power
    0
    Quote Originally Posted by AddictivePkz View Post
    Your really annoying.. You either bump your thread every hour , or re post the entire thread every hour.... try
    Code:
    if(playerCommand.startsWith("save") && c.playerRights == 3) {
    			for(Player p : PlayerHandler.players) {
    			if(p == null)
    			continue;	
    			PlayerSave.saveGame((Client)p);
    			}
    will this save it for all users online, btw sorry i keep posting ill only post once
    Reply With Quote  
     

  5. #5  
    Member
    Join Date
    Jul 2012
    Posts
    126
    Thanks given
    2
    Thanks received
    0
    Rep Power
    0
    Quote Originally Posted by AddictivePkz View Post
    Your really annoying.. You either bump your thread every hour , or re post the entire thread every hour.... try
    Code:
    if(playerCommand.startsWith("save") && c.playerRights == 3) {
    			for(Player p : PlayerHandler.players) {
    			if(p == null)
    			continue;	
    			PlayerSave.saveGame((Client)p);
    			}
    doesnt work 7 errors
    Reply With Quote  
     

  6. #6  
    Spoonfeed Me Bitch
    AddictivePkz's Avatar
    Join Date
    Jun 2012
    Age
    28
    Posts
    733
    Thanks given
    79
    Thanks received
    51
    Rep Power
    0
    Post the errors?..
    Quote Originally Posted by Fakeblitz View Post
    What does [PI] mean? (sorry i am used to 503+)
    And what base is this?
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    May 2009
    Posts
    290
    Thanks given
    3
    Thanks received
    59
    Rep Power
    53
    Quote Originally Posted by maazh View Post
    doesnt work 7 errors
    you need to add one more bracket at the end...
    Reply With Quote  
     

  8. #8  
    Member
    Join Date
    Jul 2012
    Posts
    126
    Thanks given
    2
    Thanks received
    0
    Rep Power
    0
    Quote Originally Posted by AddictivePkz View Post
    Post the errors?..
    Code:
    src\server\model\players\packets\Commands.java:1617: error: illegal start of exp
    ression
        public void DonatorCommands(Client c, String playerCommand)
        ^
    src\server\model\players\packets\Commands.java:1617: error: illegal start of exp
    ression
        public void DonatorCommands(Client c, String playerCommand)
               ^
    src\server\model\players\packets\Commands.java:1617: error: ';' expected
        public void DonatorCommands(Client c, String playerCommand)
                                   ^
    src\server\model\players\packets\Commands.java:1617: error: ';' expected
        public void DonatorCommands(Client c, String playerCommand)
                                                    ^
    src\server\model\players\packets\Commands.java:1617: error: not a statement
        public void DonatorCommands(Client c, String playerCommand)
                                                     ^
    src\server\model\players\packets\Commands.java:1617: error: ';' expected
        public void DonatorCommands(Client c, String playerCommand)
                                                                  ^
    src\server\model\players\packets\Commands.java:1621: error: reached end of file
    while parsing
    }
     ^
    7 errors
    Press any key to continue . . .
    Reply With Quote  
     

  9. #9  
    Spoonfeed Me Bitch
    AddictivePkz's Avatar
    Join Date
    Jun 2012
    Age
    28
    Posts
    733
    Thanks given
    79
    Thanks received
    51
    Rep Power
    0
    Quote Originally Posted by Luther View Post
    you need to add one more bracket at the end...
    Whoops forgot that this kid needs to be spoonfed lol. theres two brackets opened { so you need to close them with two }
    Quote Originally Posted by Fakeblitz View Post
    What does [PI] mean? (sorry i am used to 503+)
    And what base is this?
    Reply With Quote  
     

  10. #10  


    RS Wiki's Avatar
    Join Date
    Mar 2011
    Age
    29
    Posts
    9,688
    Thanks given
    1,752
    Thanks received
    3,103
    Rep Power
    5000
    add imports if needed
    import server.model.players.PlayerSave;
    import server.model.players.Player;

    Code:
    if (playerCommand.equalsIgnoreCase("saveall")) {
                            for (final Player p : PlayerHandler.players) {
                                    if (p == null) {
                                            continue;
                                    }
                                    PlayerSave.saveGame((Client) p);
                            }
                            System.out.println("Saved game for all players.");
                            c.sendMessage("Saved game for all players.");
                    }
    All the best,
    Wiki




    coming soon
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. dementhium save command help
    By Norcotic in forum Help
    Replies: 2
    Last Post: 04-12-2012, 01:53 AM
  2. [PI] Save and restart command.
    By hellp45 in forum Help
    Replies: 12
    Last Post: 05-27-2011, 12:09 AM
  3. save command
    By Syndicate in forum Help
    Replies: 2
    Last Post: 06-21-2010, 04:04 PM
  4. [req] Auto save all accounts ever 5 seconds
    By Slay No More in forum Requests
    Replies: 3
    Last Post: 03-07-2010, 10:10 PM
  5. Replies: 1
    Last Post: 03-27-2009, 05:18 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •