General discussion about LÖVE, Lua, game development, puns, and unicorns.
-
xFade
- Prole
- Posts: 41
- Joined: Mon Dec 23, 2013 6:04 pm
Post
by xFade »
Code: Select all
a = "testy test"
f = love.filesystem.newFile("Test.txt")
f:open("w")
f:write(a)
f:close()
How would I do so? I tried the above code but it doesn't work :/ It is in main.lua
(ง'̀-'́)ง
-
slime
- Solid Snayke
- Posts: 3171
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
-
Contact:
Post
by slime »
Keep in mind files will only be written to the game's save directory, which is in %appdata%/LOVE/gamename/ in Windows.
The code there should work, but it can also be done like this:
Code: Select all
a = "testy test"
love.filesystem.write("Test.txt", a)
-
xFade
- Prole
- Posts: 41
- Joined: Mon Dec 23, 2013 6:04 pm
Post
by xFade »
Thank you
(ง'̀-'́)ง
Users browsing this forum: No registered users and 2 guests