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


Contact Me
Xide
Online Scripting Reference

getCourse

Purpose
Internally calculates a warp course using warp data in the TWX Proxy database.

Syntax
getCourse varspec {fromSector} {toSector}

varspec: A variable that will contain the results of the course plotting.

{fromSector}: The sector to plot the course from.

{toSector}: The sector to plot the course to.



Notes
This command will plot a warp course without the use of the remote server. Note that this can only be done if there is sufficient warp data to properly plot the course.

'varspec' will contain the length (number of hops) of the warp course between the two sectors. This variable will be transformed into a dynamic array holding in sequence every sector in the warp course, i.e:

getCourse $course 1 10

Would return:

$course = 2
$course[1] = 1
$course[2] = 2
$course[3] = 10


If the warp course could not be calculated, 'varspec' will be set to -1.

Example
# plot and display a warp course

getInput $fromSector "Enter a sector to plot from"
getInput $toSector "Enter a sector to plot to"
getCourse $course $fromSector $toSector

setVar $i 0

while ($i <= course)
  echo $course[$i] " "
  add $i 1
end



Return to item listing