Search:

Type: Posts; User: LavaJava

Search: Search took 0.12 seconds.

  1. Re: Strings, using \n deletes the string on that line.

    public void addRecords(String record, int value){
    openFile();
    System.out.println("Records added.");
    switch(record){
    case "brick":
    x.format("%s%n", "brick " + value);
    closeFile();...
  2. Strings, using \n deletes the string on that line.

    I am trying to write to a text file with information stored like this.

    brick 500
    stone 500

    And so on. Here is the code I am using to write to the file.


    switch(record){
    case "brick":
  3. Replies
    3
    Views
    792

    [SOLVED] Re: Problem changing values in a save file.

    Thank you for the response!

    I have come to the conclusion that the while loop is not running. When I call the readResource() method from the main function it works just fine, but when it's called...
  4. Replies
    3
    Views
    792

    [SOLVED] Problem changing values in a save file.

    Sorry if I sound like I don't know what I'm talking about, but anyways. I'm trying to change the value of bricks in my save file and for some reason it can't read the information.



    public void...
Results 1 to 4 of 4