Oh wait, I just tried to do the calculation of how much money you get offline, but it gives ANOTHER error. If I'm bothering you then I can just try and figure it out myself, but if you don't mind could you help? Here's the code I'm using:
local function initialize()
printerImage = gfx.image.new("images/Printer")
printerSprite = gfx.sprite.new(playerImage)
printerSprite:moveTo(200, 120)
printerSprite:add()
local nowTime = playdate.getTime()
save.money = save.money +
(
((save.lastTime.hours - save.lastTime.minutes) - (nowTime.hours - nowTime.minutes)) *
(save.billValue * save.managers))
end
initialize()
And the error:
Load failed: main.lua:46: attempt to perform arithmetic on a nil value (field 'hours')
stack traceback:
main.lua:46: in local 'initialize'
main.lua:50: in main chunk
Update error: main.lua:46: attempt to perform arithmetic on a nil value (field 'hours')
stack traceback:
main.lua:46: in local 'initialize'
main.lua:50: in main chunk