Back

SaveBoolean

The SaveBoolean method saves a boolean (true or false) value to the user's storage space. Use this method when saving and loading user preferences.

The third parameter is an optional text parameter and allows sharing of data across multiple Apps when the same id is used by both apps.

 app.SaveBoolean( valueName, value, id );

Example

function OnStart()
{
  b = app.LoadBoolean( "MyBool", true );
  app.ShowPopup( b );

  app.SaveBoolean( "MyBool", !b );
}
  Copy   Copy All    Run