Hello everyone, I try to save the score information permanently with the following code
cc.sys.localStorage.setItem(‘punctuation’, total punctuation);
console.log (“datoswwwww …” + cc.sys.localStorage.getItem(‘punctuation’));
But the information is being added in a concatenated way to the registry, I need to keep a single record with the new information updated, this is the way in which the information is being stored.
Simulator: JS: Cocos Creator v2.1.0
Simulator: JS: datoswwwww … 10
Simulator: JS: datoswwwww … 1010
Simulator: JS: datoswwwww … 101010
Even if I save the information in a variable, I delete the record and add the new information, the same thing happens
Can you help me to know how I can do it?