TIC-80
TIC-80 copied to clipboard
pmem doesn't save in MENU callback
When trying to save something with the new custom game menu functionality inside the MENU
callback, pmem(id,value)
doesn't save the value.
-- menu: ITEM1
...
function item1()
local value=pmem(0)
trace(value) --this gives always zero
value=4
pmem(0,value)
trace(pmem(0)) --somehow reading the value here gives the correct value of 4
end
function MENU(i)
if i==0 then item1()end
end