Search found 10 matches
- Tue Jul 09, 2013 9:08 pm
- Forum: General
- Topic: Text File Help?
- Replies: 13
- Views: 8536
Re: Text File Help?
Sorry i forgot to comment out that line.
- Tue Jul 09, 2013 8:10 pm
- Forum: General
- Topic: Text File Help?
- Replies: 13
- Views: 8536
Re: Text File Help?
Here you go.
- Mon Jul 08, 2013 4:39 am
- Forum: General
- Topic: Text File Help?
- Replies: 13
- Views: 8536
Re: Text File Help?
Okay so its telling me that my "map.txt" file is not in the directory when it actually is. Any other reason it would be saying this?
The file is in both my project directory and my users roaming directory.
Makes me feel kinda stupid.
The file is in both my project directory and my users roaming directory.
Makes me feel kinda stupid.
- Sun Jul 07, 2013 5:28 am
- Forum: General
- Topic: Text File Help?
- Replies: 13
- Views: 8536
Re: Text File Help?
I wanted to use a text file that way people can make their own maps will a program I wrote.
- Sun Jul 07, 2013 4:56 am
- Forum: General
- Topic: Text File Help?
- Replies: 13
- Views: 8536
Text File Help?
So I know how to read a text file but if I wanted to do a tile based game how would I go about it?
if I had a file like this:
1,1,1,1,1
1,2,2,2,1
1,2,3,2,1
1,2,2,2,1
1,1,1,1,1
How could I get the the 2nd line down and 3rd row over?
if I had a file like this:
1,1,1,1,1
1,2,2,2,1
1,2,3,2,1
1,2,2,2,1
1,1,1,1,1
How could I get the the 2nd line down and 3rd row over?
- Tue Jul 02, 2013 5:59 am
- Forum: General
- Topic: File Access gone wrong
- Replies: 11
- Views: 7327
Re: File Access gone wrong
It writes the map.lua. Function called saveTileMap
- Fri Jun 28, 2013 5:39 pm
- Forum: General
- Topic: File Access gone wrong
- Replies: 11
- Views: 7327
Re: File Access gone wrong
Sorry about that. Here is my .lua main file and a .zip.
- Thu Jun 27, 2013 11:56 pm
- Forum: General
- Topic: File Access gone wrong
- Replies: 11
- Views: 7327
Re: File Access gone wrong
but if i wanted to pull out a specific row/column in a file how would i do that? In your case: map[2][3] Now, the way you've set it up, loading a map file overwrites a global called map , which might be problematic. If you change the line local strg = "map = {\n" to local strg = "ret...
- Sat Jun 22, 2013 1:39 am
- Forum: General
- Topic: File Access gone wrong
- Replies: 11
- Views: 7327
Re: File Access gone wrong
I have this in my code:
but if i wanted to pull out a specific row/column in a file how would i do that?
EX: getting the 2nd row and 3rd column value
0,0,0,0,0
0,0,5,0,0
0,0,0,0,0
Code: Select all
chunk = love.filesystem.load("map.lua")()
local result = chunk()
EX: getting the 2nd row and 3rd column value
0,0,0,0,0
0,0,5,0,0
0,0,0,0,0
- Thu Jun 20, 2013 1:24 am
- Forum: General
- Topic: File Access gone wrong
- Replies: 11
- Views: 7327
File Access gone wrong
I am trying to input a tilemap for my game but i dont really know how to continue on the loading part. Any help or ideas would be much appreciated. function saveTileMap() local map = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0,...