Hi people
I am using ice library to create my save/load system, but i need to create some like it:
- enter on the game and go to settings menu and stop the music, clicking on the music button.
- and then go to the gameplay and pause the game, and will appear some buttons, including the music button, and it should be with the image of music off.
i tried to create some like that, and create this:
external\_file.lua:
local data = ice:newBox( "database")
data:store( "music", "off" )
gameplay.lua
local data = ice:loadBox( "database")
local game = data:retrieve( "music")
data:store( "music", "on" )
data:save()
print(game)
but it dont works great, because he only save the new value of music if i press 2 times on the button, and should be only necessary to click one time.
if anyone can help me with this problem it will be great for me.
Thanks
[import]uid: 26056 topic_id: 20448 reply_id: 320448[/import]