Omnimaga
Calculator Community => TI Calculators => Lua => Topic started by: pianoman on July 29, 2011, 01:05:27 pm
-
^^That
I tried document.markChanged(), but it didn't save anything.
-
^^That
I tried document.markChanged(), but it didn't save anything.
You need to use var (http://wiki.inspired-lua.org/Category:var) so that you can store (var.store(()) variables forever. And markChanged() is only to warn the user that he must save, it doesn't actually save anything.
I learnt it by looking at code of other programs ;) To be precise, Pixel Escape.
-
Oh, ok, I'll take a look at the code for that. Thanks!
-
Oh, ok, I'll take a look at the code for that. Thanks!
It's actually very easy, don't forget to check #nspire-lua for additional help. I had the guys from there help me with this and I can also help you now.
-
l think var.monitor should also be used.
-
l think var.monitor should also be used.
Yep, to prevent the user from hacking into the high score ^^
-
yep, definitely, on any non wanted var.change, you could rewrite it from a local lua copy :P
-
all right
-
A little bump for this topic to add a full and detailed answer :
http://www.inspired-lua.org/2011/08/save-a-high-score-without-cheating-possibility/
-
It's still quite easy to cheat...
You just have to
1. open the page sorter
2. cut (Ctrl+X) the Lua app
3. add a math editor
4. change your var
5. paste the Lua app
EDIT : I did not see the last part with on.save() and on.restore()... It makes my solution useless