Error Using the LeaveShip method

markm1701

Active Member
I'm trying to to use the Leaveship method of the items datatype.

I can't get it to work when using searching through the Hangerships items


I was writing a script to get into each one of my ships and fly it to a destination then leave the ship and then return to my original station and then repeat till there are no more ships left


the error i'm getting is

Error:No such 'variable' method 'LeaveShip' @hsIterator.Value:LeaveShip
Error parsing data sequence ''
Dumping script stack
--------------------

I assume i'm using the wrong collection of items

below is the script i was using.


Code:
function main()
	{
		variable index:item hsIndex
		variable iterator hsIterator
		variable string shipName

		if (${Me.InStation})
		{
			Me:DoGetHangarShips[hsIndex]
			hsIndex:GetIterator[hsIterator]

			shipName:Set[${Me.Ship}]
			if ${hsIterator:First(exists)}
			{
				do
				{
					if ${hsIterator.Value.GivenName.Equal[${shipName}]}
					{
						echo "obj_Ship: Leaving Ship named ${hsIterator.Value.GivenName}."
						hsIterator.Value:LeaveShip
						wait 10
						break
					}
				}
				while ${hsIterator:Next(exists)}
			}
		}
	}
 

Amadeus

The Maestro
Staff member
There was a bug in ISXEVE that was preventing this from working. Try it with version 20100121.0023
 
Top Bottom