Thread: Ascend Saving Character Files Help

Results 1 to 4 of 4
  1. #1 Ascend Saving Character Files Help 
    Registered Member
    Join Date
    Jun 2019
    Posts
    4
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Hi guys, I'm just getting back into servers after five or so years so i'm a little rusty. I'm using an ascend base and to my knowledge, everywhere that it calls the save function I have changed the path to a new folder in my C:\ named "Characters".
    Places in my playersave.java that contain that directory
    Code:
    public static boolean playerExists(String name) {
    		File file = new File(System.getProperty("user.home") + "/Characters/" + name + ".txt");
    		return file.exists();}
    
    
    
    File character = new File(System.getProperty("user.home") + "/Characters/" + name + ".txt");
    		List<String> lines = new ArrayList<>();
    		try (BufferedReader reader = new BufferedReader(new FileReader(character))) {
    			String line;
    			while ((line = reader.readLine()) != null) {
    				lines.add(line);
    			}
    			reader.close();
    
    
    try {
    			characterfile = new BufferedWriter(new FileWriter(Config.CHARACTER_SAVE_DIRECTORY + p.playerName + ".txt"));
    In my config.java
    Code:
    public static String CHARACTER_SAVE_DIRECTORY = System.getProperty("user.home") + "/Characters/";

    If you could help that'd be awesome. I just can't figure out what i'm doing wrong.


    The Error I'm getting is below
    Code:
    java.io.FileNotFoundException: C:\Users\dwayne\Characters\Dentie.txt (The system cannot find the path specified)
    [6/12/19 11:24 PM]: Could not save for Dentie
    	at java.io.FileOutputStream.open0(Native Method)
    	at java.io.FileOutputStream.open(Unknown Source)
    	at java.io.FileOutputStream.<init>(Unknown Source)
    	at java.io.FileOutputStream.<init>(Unknown Source)
    	at java.io.FileWriter.<init>(Unknown Source)
    	at ethos.model.players.PlayerSave.saveGame(PlayerSave.java:1194)
    	at ethos.model.players.PlayerHandler.process(PlayerHandler.java:173)
    	at ethos.Server.lambda$0(Server.java:174)
    	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    	at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
    	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
    	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    	at java.lang.Thread.run(Unknown Source)
    Reply With Quote  
     

  2. #2  
    Donator


    Join Date
    Jan 2010
    Age
    25
    Posts
    3,968
    Thanks given
    254
    Thanks received
    463
    Rep Power
    511
    (The system cannot find the path specified)

    Meaning it cannot find the file in the folder Characters in your user folder
    Reply With Quote  
     

  3. #3  
    Kourend - Coming soon..

    C.T.'s Avatar
    Join Date
    Jan 2019
    Posts
    111
    Thanks given
    21
    Thanks received
    34
    Rep Power
    76
    create the character folder on your desktop dude
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jun 2019
    Posts
    4
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    I had attempted to do that first but still ran into issues, and that’s why I ended up changing it. But I’ll retry when I get back home. Thanks!

    Alright so the reason this wasn't working was because my laptop's desktop was hooked up to a Microsoft OneDrive. So everywhere that it says
    ystem.getProperty("user.home")
    I changed it to
    C:/Users/dwayne/OneDrive/Desktop/Characters
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

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

Similar Threads

  1. Ip saving to characters file[HELP]
    By Almagesrnubs in forum Help
    Replies: 2
    Last Post: 06-16-2012, 12:36 PM
  2. Delta Character file Help
    By Deltas in forum Help
    Replies: 2
    Last Post: 10-09-2011, 09:40 PM
  3. saving character files
    By superbombet in forum Help
    Replies: 5
    Last Post: 08-27-2009, 03:41 PM
  4. character files help plz :) (blake scape)
    By Producer in forum Help
    Replies: 4
    Last Post: 04-20-2009, 11:21 PM
  5. Characters File help
    By T9X in forum Help
    Replies: 3
    Last Post: 03-22-2009, 01:37 AM
Tags for this Thread

View Tag Cloud

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