Java Exception Thrown When Making New Line

Create issue
Issue #24 new
Former user created an issue

Hello, I encountered a Java error in when testing this code:

local newCode = "abc/n123"
local editFile = "testy"
----------------------------
local f = fs.open(editFile, "r")--Retrieves files code. I used 'testy' to test.
local oldFile = f.readAll()
f.close()
local f = fs.open(editFile, "w")--Writes over old code.
f.writeLine(newCode)
f.write(oldFile)
f.close()
----------------------------

More information is here. I think it happens when making a new line with /n.

Comments (3)

  1. Thomas Farr repo owner

    I've tested that code and got no errors, If you're able to replicate the error, could you post either the output from the command line when the exception occurs.

  2. Former user Account Deleted reporter

    I did some testing and it seemed to work fine this time. Not sure why it didn't work when trying to recreate it.

  3. Log in to comment