Not files are saved in "export" and logs in "logs"

This commit is contained in:
bizcochito 2022-02-08 10:52:37 +01:00
parent ef58a6e383
commit 7e134f7961
3 changed files with 9 additions and 4 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
logs*
export*

View File

@ -1,8 +1,9 @@
function ExportLevel(levelname, filename)
os.execute( "mkdir \"./Mothback/export\"" )
filename = filename or "output.lua"
filename = "Mothback/export/"..filename
exportFile = io.open(filename, "a+")
local success, message = love.filesystem.write(filename, "")
if success then
if exportFile then
exportFile:write("return {")
logPrint("Exporting level \"".. levelname .. "\"...")
exportFile:write("\n name = \"" .. levelname .. "\",")
@ -56,4 +57,6 @@ return {
objects = {}
}
]]
logFile = io.open("mothback_"..os.date("%Y-%m-%d_%H-%M-%S")..".log", "a+")
-- Make log stuff
os.execute( "mkdir \"./Mothback/logs\"" )
logFile = io.open("Mothback/logs/mothback_"..os.date("%Y-%m-%d_%H-%M-%S")..".log", "a+")

View File

@ -59,7 +59,7 @@ function interfaceDialog:checkConfirm()
if love.mouse.isDown(1) then
self.clicked = true
self.value = self.value + 1
logPrint(self.value.." of "..self.target_value)
logPrint("Dialog: "..self.value.." of "..self.target_value)
self:updateContents()
end
elseif not love.mouse.isDown(1) then