[HTML5] Is there a way to store persistant variable values?

edited September 2012 in Client Help
Currently every time you log in you are asked if you wish to load your settings and any variables are set to your initial declaration.

An example would be a variable I have called 'onguard' which can be either 1 or 0 and determines if I wish to raise my defences or not.  I declared it with a value of 0 which is perfect for most of the time and setting it on log in, should I so desire, with '@set onguard 1' isn't exactly taxing.  However, this is just a trivial example to illustrate a much bigger issue of variable value persistence.

Best Answer

  • Accepted Answer
    Currently, variables set via the @set command or using the "set_variable()" function via a script will be persisted, but ONLY if you save your system before you close the client.  This assumes, of course, that you don't have something in onLoad or another script that overwrites the value every time you load your system.

    I'm intrigued, however; it may be feasible to add a mechanism that automatically stores the current state of your variables in the background.  I'll ponder it with the rest of the staff and see what can be done along those lines.

    Thanks!

    - Cromm

Answers

  • edited September 2012
    Currently I export my settings, edit them and then import them.  If I include variable definitions their values are reset.  If I don't include variable definitions they will no longer exist.

    A puzzle indeed.  Still, your answer still stands and I am thankful to you Cromm.
Sign In or Register to comment.