I want to save the score of a player?

How can i save score and then load , rewrite this date?

That’s a simple example for loading and saving game scores for my old game :
as “save_state” is a table, you’re able to add as much as possible data you want.

[LOAD]

local save_state = sys.load(sys.get_save_file("blowing_bubble_hd", "save_state"))
	if not next(save_state) then
    	self.scores = 0
else
    	self.scores = save_state.scores	
end

[SAVE]

local save_state = {
	scores =  self.scores
}

local success = sys.save(sys.get_save_file("blowing_bubble_hd", "save_state"), save_state)
3 Likes