Hello,
Can anyone tell me what really return the function love.filesystem.read()?
like...
filename = "the/directory/to/the/file"
word=love.filesystem.read(filename)
I have a file contain just words that beginning with 'A' and I write the directory for the file, but when I print [love.graphics.print(word)] it says nil
How can I show the contents of the file?
what return .filesystem.read()?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- HugoBDesigner
- Party member
- Posts: 403
- Joined: Mon Feb 24, 2014 6:54 pm
- Location: Above the Pocket Dimension
- Contact:
Re: what return .filesystem.read()?
love.filesystem takes directories that are withing the game files only (or the appdata corresponding folder for the game).
So, for example, if you have "test.txt" at the same level of your main.lua file, you'll only need love.filesystem.read("test.txt"), instead of "C:/Users/Username/Desktop/My Game/test.txt".
At least I assume that's your problem. I can't help much with the information given.
So, for example, if you have "test.txt" at the same level of your main.lua file, you'll only need love.filesystem.read("test.txt"), instead of "C:/Users/Username/Desktop/My Game/test.txt".
At least I assume that's your problem. I can't help much with the information given.
Who is online
Users browsing this forum: Amazon [Bot], Bing [Bot] and 9 guests