in the following script I tried to creat a menu to easily command my ships.
The menu itself worked without problems, but my ships won't accept the commans move to position and fly to station.* ************************************************
* SCRIPT NAME: COSIN.nav.xml
* DESCRIPTION: COSIN navigation
*
* AUTHOR: Madhax47 DATE: 30 August 2014
* ************************************************
$text = sprintf: pageid=8911 textid=3, null, null, null, null, null
$menu = create custom menu array: heading=$text
add custom menu item to array $menu: page=8911 id=6 returnvalue='goto'
add custom menu item to array $menu: page=8911 id=7 returnvalue='dock'
add custom menu item to array $menu: page=8911 id=8 returnvalue='follow'
add custom menu item to array $menu: page=8911 id=9 returnvalue='go.gate'
add custom menu item to array $menu: page=8911 id=10 returnvalue='go.sec'
add custom menu item to array $menu: page=8911 id=11 returnvalue='jump'
add custom menu item to array $menu: page=8911 id=12 returnvalue='jump.goto'
add custom menu item to array $menu: page=8911 id=13 returnvalue='jump.dock'
label.menu:
= wait 5 ms
$text = sprintf: pageid=8911 textid=1, null, null, null, null, null
$ans = open custom menu: title=$text description='' option array=$menu
if $ans == -1
return null
else if $ans == 'goto'
$ship = [THIS]-> get user input: type=[Var/Ship owned by Player], title='Waehlen Sie Ihr Schiff'
$sector = $ship-> get sector
$position = [THIS]-> get user input type=[Var/Sector Position], title='Waelen Sie die Position', sector=$sector
$pos.x = $position-> get x position
$pos.y = $position-> get y position
$pos.z = $position-> get z position
$command = $ship-> move to position: x=$pos.x y=$pos.y z=$pos.z with precision 2000 m
else if $ans == 'dock'
$ship = [THIS]-> get user input: type=[Var/Ship owned by Player], title='Waehlen Sie Ihr Schiff'
$sector = $ship-> get sector
$station = [THIS]-> get user input type=[Var/Station/Carrier to dock at], title='Waelen Sie die Station', sector=$sector
$command = $ship-> fly to station $station
else if $ans == 'follow'
* $follow=[THIS]-> call script `COSIN.property` :
else if $ans == 'go.sec'
* $go.gate=[THIS]-> call script `COSIN.property` :
else if $ans == 'go.gate'
* $go.gate=[THIS]-> call script `COSIN.property` :
else if $ans == 'jump'
* $jump=[THIS]-> call script `COSIN.property` :
else if $ans == 'jump.goto'
* $jump.goto=[THIS]-> call script `COSIN.property` :
else if $ans == 'jump.dock'
* $jump.dock=[THIS]-> call script `COSIN.property` :
end
goto label label.menu:
return null
I hope someone can help me with my problem.