Search found 22 matches
- Sat Jul 06, 2013 3:34 am
- Forum: Support and Development
- Topic: Saving Data
- Replies: 20
- Views: 9558
Re: Saving Data
Fun fact, Lua's file IO will write files to the LOVE install directory.
- Sat Jul 06, 2013 12:05 am
- Forum: Support and Development
- Topic: Saving Data
- Replies: 20
- Views: 9558
Re: Saving Data
I've got it mostly sorted out, but there's one more big problem. How do you read either a specific byte or specific line of a file? Either way works. If it's not possible, then love just can't do what I'm trying to do. love.filesystem.lines and file:read don't work, because they force you to start a...
- Thu Jul 04, 2013 8:12 pm
- Forum: Support and Development
- Topic: Saving Data
- Replies: 20
- Views: 9558
Re: Saving Data
I see mari0 there and that's it.
- Thu Jul 04, 2013 6:31 pm
- Forum: Support and Development
- Topic: Saving Data
- Replies: 20
- Views: 9558
Re: Saving Data
Then where is it writing it? If you look at the code that I posted, I'm not actually using love.filesystem yet, just the standard Lua file I/O.T-Bone wrote:You do know that the files you write don't end up in the same directory as the game files, don't you?
- Thu Jul 04, 2013 6:25 am
- Forum: Support and Development
- Topic: Saving Data
- Replies: 20
- Views: 9558
Re: Saving Data
Yeah, I've done some more testing, and tried a few extra things and nothing is happening at all. I'm guessing you must be required to use love.filesystem... so I'll give that a shot instead. Do you know of any more extensive tutorials on love.fileystem other than this? http://love2d.org/wiki/love.fi...
- Thu Jul 04, 2013 5:59 am
- Forum: Support and Development
- Topic: Saving Data
- Replies: 20
- Views: 9558
Re: Saving Data
Well, I've used C++ binary files in the past, and was just trying to do that, but it seems to refuse to write to binary files. I've actually got my map saving system up and running, but it will only write to text files (which I'd rather not have since players can edit them) even though I've told it ...
- Thu Jul 04, 2013 5:30 am
- Forum: Support and Development
- Topic: Saving Data
- Replies: 20
- Views: 9558
Saving Data
I'm having a heck of a time figuring out how to create savegames. There's far too little info on the love filesystem module (or maybe I just haven't been able to find it.) and there's almost no info about binary files with lua. I know this is a very broad question, but how do I save? The game I'm wo...
- Tue Jul 02, 2013 10:48 pm
- Forum: Support and Development
- Topic: Iterating through a table if it doesn't have an index?
- Replies: 4
- Views: 3179
Iterating through a table if it doesn't have an index?
So, I have a table something along these lines: fruit = { apples = { 'a', "red", 5 } oranges = { 'o', "orange", 12 } pears = { 'p', "green", 7 } } It doesn't seem like it's possible to access them based on their index, and the values themselves are tables, so I just mad...
- Tue Jul 02, 2013 5:36 pm
- Forum: Support and Development
- Topic: Can't print certain characters.
- Replies: 2
- Views: 2147
Re: Can't print certain characters.
Well, shoot you're right. I didn't know what BOM was, so I just did UTF-8 encoding, and never tried that other option. Guess I should have. It works now, thanks.
- Tue Jul 02, 2013 5:59 am
- Forum: Support and Development
- Topic: Can't print certain characters.
- Replies: 2
- Views: 2147
Can't print certain characters.
I'd like to print some unusual ascii characters, and using the standard font/print I get the following error: "graphics.lua:1265: Decoding error: Invalid UTF-8" And if I set notepad++ to encode it UTF-8 so it can actually display the character: "graphics.lua:1273: Decoding error: Inva...