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


Contact Me
Xide
Online Scripting Reference

loadVar

Purpose
Loads a variable from a file automatically associated with the currently selected TWX Database.

Syntax
loadVar var

var: The name of a variable to load from file.



Notes
This command will load a variable from the .cfg file stored in parallel with TWX Proxy's .xdb files. It can be used for retrieving variables associated with a script's configuration, and is a very nice tool for menus.

If the variable is not saved, "var" will be set to "0".

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