Hi!
I'm sorry if this is a silly question. I'm pretty clueless, but Gideros and the community make it fun!
I think I'm starting to get dataSaver working for the most part... but I am looking for a way to allow users to name their character. (Well, for the name to be saved.)
The user defines 'username' with a TextInputDialog...
local function onComplete(event)
if event.buttonIndex then
username = event.text,
dataSaver.saveValue("|D|username", username)
...doesn't seem to work, and I'm not sure if I'm just doing something wrong, or dataSaver isn't meant for that. If that can't be done with dataSaver is there something else I can use in Gideros for it?
Comments
You only need |D| for save and load methods, because they are saving data in separate files.
But all in all it should have worked
Humm..
in the main.lua I've got...
username = dataSaver.loadValue("username")
if(not username) then
username = "Alice"
dataSaver.saveValue("username", username)
end
when I close and reopen the game username always reverts back to Alice, maybe I'm doing something wrong there?