LöveOS
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: LöveOS
That works. Thanks, guys.
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: LöveOS
Okay, so I have this code to export all the globals in my project into a .log file:
Is there any way to get the actual value of the variable as well? So I can have "variable type", "variable name", "variable value".
Code: Select all
function exportGlobalLog()
local transferTable = {}
local i = 1
for k, v in pairs(_G) do
transferTable[i] = { name = k, type = type(v) }
i = i + 1
end
table.sort( transferTable,
function(a, b)
return a.type > b.type
end
)
local t = "GLOBAL EXPORT LOG:\n"
for k, v in pairs(transferTable) do
t = t .. " " .. v.type .. " " .. v.name .. "\n"
end
lfs.write("global_export.log", t)
end
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: LöveOS
Ehm, put v itself in the transferTable?
Of course, if it is a table you'll get something like table: 0xadc3b0, unless you implement or use some form of serialization.
Of course, if it is a table you'll get something like table: 0xadc3b0, unless you implement or use some form of serialization.
Help us help you: attach a .love.
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: LöveOS
That works. Brain fart. Thanks.Robin wrote:Ehm, put v itself in the transferTable?
Of course, if it is a table you'll get something like table: 0xadc3b0, unless you implement or use some form of serialization.
Re: LöveOS
good work comrade!
Re: LöveOS
Bringing you guys a status update. Here is a list of available commands for LoveOS.
https://github.com/jessehorne/loveos
Help is welcome! We can chat about it in ##jesseh on Freenode, or #love on OFTC.
I would also like to see this used in a game or two as a in-game computer or something.
https://github.com/jessehorne/loveos
Code: Select all
clear -- Used for clearing the console
touch -- Used for creating files with no content
mkdir -- Used for creating directories
help -- Help feature, shows available commands
ls -- Lists the current directory
run -- Runs a Lua script (all lua scripts much use the libloveos library)
rm -- Removes a file/directory
cd -- Used for changing directories
I would also like to see this used in a game or two as a in-game computer or something.
- baconhawka7x
- Party member
- Posts: 491
- Joined: Mon Nov 21, 2011 7:05 am
- Location: Oregon, USA
- Contact:
Re: LöveOS
I know right?!
Re: LöveOS
So it's been a while since I worked on this, but I have some news. I just updated it, so it works with 0.9.*. I also fixed some major bugs with the filesystem library.
Some planned features...
1 - Add "love <dir>" command so that you could run love games "inside" LoveOS
2 - Add "derplang <dir>" command so that you could run Derplang programs "inside" LoveOS
If you have any ideas/suggestions, let me know!
Some planned features...
1 - Add "love <dir>" command so that you could run love games "inside" LoveOS
2 - Add "derplang <dir>" command so that you could run Derplang programs "inside" LoveOS
If you have any ideas/suggestions, let me know!
Who is online
Users browsing this forum: Ahrefs [Bot], Amazon [Bot] and 3 guests