Search found 5 matches
- Tue Jul 02, 2013 5:07 pm
- Forum: General
- Topic: Reloading Files during Runtime
- Replies: 12
- Views: 6200
Re: Reloading Files during Runtime
ok so this it what i've done so far: function love.keypressed(key) . . . elseif key == "x" then love.filesystem.load(conf.lua) end end but i get the following error code when i press x on the keyboard: Error main.lua:85: attempt to index global 'conf' (a nil value) Traceback ...
- Tue Jul 02, 2013 4:54 pm
- Forum: General
- Topic: Reloading Files during Runtime
- Replies: 12
- Views: 6200
Re: Reloading Files during Runtime
I haven't tried it but, you can open and execute code with love.filesystem.load(filename)() yeah but can i do that with the config.lua during the runtime? i mean i don't want to load a file, i want to reload it after i've edited it. local module = require ( "module" ) -- some work here mo...
- Tue Jul 02, 2013 3:43 pm
- Forum: General
- Topic: Reloading Files during Runtime
- Replies: 12
- Views: 6200
Reloading Files during Runtime
Hello everybody, in the moment i'm trying to build a little labyrinth game and I've been thinking about a "Reload-Function" to edit the game settings while the game is running. So is it possible, to press a "refresh-button" during the game and reload updated files that are includ...
- Thu Jun 13, 2013 12:44 pm
- Forum: Support and Development
- Topic: Reading the lines out of a .txt File
- Replies: 3
- Views: 2246
Re: Reading the lines out of a .txt File
thanks for your great help, i solved the problem.
regards pilleman
regards pilleman
- Wed Jun 12, 2013 8:25 pm
- Forum: Support and Development
- Topic: Reading the lines out of a .txt File
- Replies: 3
- Views: 2246
Reading the lines out of a .txt File
Hello everybody, i'm trying to read seperated lines out of a txt-file, to insert them as a map into my main.lua The txt-file looks like this: 0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0 0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0 0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0 And my loop like this: main = {} function love.load() local ma...