Solved Help with saving arenas

Discussion in 'Plugin Development' started by whatapigdoes, Dec 8, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    whatapigdoes

    Hi,

    In my plugin i am trying to save each arena instance to arena.(name) with the following keys:

    enabled
    lobby location (string made from this gist)
    and a string list of locations (made from the same gist)

    My arenas save ok but when i try to re load them they are marked as malformed
    My current arenamanager which contains saving and loading is here
    And my arena object is here
     
  2. Offline

    whatapigdoes

  3. Offline

    felixfritz

    I think there's one ` too much at the very beginning when you're saving it. When you load it again, I think the world would be then in your first index and the coordinates in your 2nd, 3rd and 4th.

    You can try and see what comes out, if you do Arrays.toString(list); right after splitting the string in line 11.
     
  4. Offline

    whatapigdoes

    What?
    Line 11 is s = s + l.getX() + "`";

    How would toString work?
     
  5. Offline

    felixfritz

    From the code you've posted you started with this:
    String s = "`" + l.getWorld().getName() + "`";
     
  6. Offline

    whatapigdoes

    I tried without the first grave mark and it still didn't work
     
  7. Offline

    felixfritz

    What happens when you print out the array? (Arrays.toString(list); )
     
  8. Offline

    whatapigdoes

    It returns 17:15:30 [INFO] [TurtleSG] [world, -145.07683268776546, 66.61897820457392, 133.3
    7975924355132] for my lobby and
    17:15:30 [INFO] [TurtleSG] [world, -145.07683268776546, 64.99897820457392, 133.3
    7975924355132] for the 1 spawn i added


    *MEGA facepalm*

    I did something so stupid i can't even tell you what it is....

    Solved
     
Thread Status:
Not open for further replies.

Share This Page