User Login
Name
Password
Site Contents
News
About
Download
Scripts
Tutorials
Register
Support
FAQ
Script Reference
New User


Contact Me
Xide
Online Scripting Reference

saveVar

Purpose
Saves a variable to a file automatically associated with the currently selected TWX Database.

Syntax
saveVar var

var: The name of a variable to save to file.



Notes
This command will save a variable to the .cfg file held in parallel with TWX Proxy's .xdb database files. Variables can be stored and retreived at any time, but must be under the same name.

To load a variable, use the "loadVar" command.

Example
# get defaults
loadVar $EvilSaved

if ($EvilSaved)
  loadVar $evil_stealFactor
  loadVar $evil_robFactor
  loadVar $evil_continue
  loadVar $evil_broadcast
  loadVar $evil_shipsetup
  loadVar $evil_haggle
else
  setVar $evil_stealFactor 30
  setVar $evil_robFactor 3
  setVar $evil_continue 1
  setVar $evil_broadcast 1
  setVar $evil_shipSetup ""
  setVar $evil_haggle 1
  
  saveVar $evil_stealFactor
  saveVar $evil_robFactor
  saveVar $evil_continue
  saveVar $evil_broadcast
  saveVar $evil_shipSetup
  saveVar $evil_haggle
  
  setVar $EvilSaved 1
  saveVar $EvilSaved
end




Return to item listing