Recently I made a game with "easy", "normal", "hard" modes. You can choose any mode on the menu.lua page(which is first scene loading in main.lua). When you end the game for example in "easy" mode, this happens:
1) in game.lua
easyVal = math.max(easyVal, times)
Note: easyVal is global value declared in menu.lua via
easyVal = dataSave:loadValue("easy")
2) then go the the menu page in menu.lua
easyVal is declared in Menu:init() and again here it is printed
Thus highscore was updated, the score doesn't change after exiting game.lua and updating easyVal. Can you please point me to a solution?