
Search found 4 matches
- Sun May 10, 2015 8:11 pm
- Forum: Support and Development
- Topic: Table in table problem
- Replies: 3
- Views: 1464
Re: Table in table problem
Yay thank you guys! Thats exactly what i wanted to achieve 

- Sun May 10, 2015 7:28 pm
- Forum: Support and Development
- Topic: Table in table problem
- Replies: 3
- Views: 1464
Table in table problem
Hi guys. I want to make a table with some data, and then make few tables containing the 1st table, and then make operations on them separately(?) So i have this: function love.load() tab1 = {} tab1[1] = {a=1,b=1} tab1[2] = {a=5,b=6} tab2 = {} tab2[1] = {tab1 = tab1} tab2[2] = {tab1 = tab1} end funct...
- Tue Apr 14, 2015 12:40 pm
- Forum: Support and Development
- Topic: Source code loading from .txt file :P
- Replies: 4
- Views: 2505
Re: Source code loading from .txt file :P
Do this: -- load file contents as a string contents = love.filesystem.read("/path/to/file") -- execute string loadstring(contents) () -- use this if you want to "catch" any errors that are thrown when running this string of code -- assert(loadstring(contents)) () This might also...
- Mon Apr 13, 2015 7:41 pm
- Forum: Support and Development
- Topic: Source code loading from .txt file :P
- Replies: 4
- Views: 2505
Source code loading from .txt file :P
Hi, let's say i have source code for enemy saved in .txt file and need to load it to variable, and then run this code from that variable. something like this: function love.load() monsterhp = 15 --want to load the .txt file contents here end function love.update(dt) -- running txt contents here end ...