Getting negative Int from a file

Discussion in 'Plugin Development' started by Welite, Nov 27, 2013.

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

    Welite

    Hi, today I have investigate serious problem with getting negative Integer values from a file, I can write negative Int but I can not read it, it gives me 0. When I try to retrieve it as double I have the same 0.0.


    double X = Arenas.getDouble(arena + ".corner.x" + 1);

    And in file I have something like
    Code:
    Arena:
      corner:
            x: -144
      


    When I try to get positive value then no problem, I have problem only with getting this negative values.
     
  2. Offline

    pope_on_dope

    i have no idea why it wouldnt work, but you can try this as an alternative
    Code:
    String Xs = Arenas.getString(arena+".corner.x");
    int x = Integer.parseInt(Xs);
     
Thread Status:
Not open for further replies.

Share This Page