mamba
Member
Hello. I'm trying to use the MoveTo, CATEGORYID_CHARGE to transfer to the ship, but I have nothing. Here's the code listing
and log
I can not understand what the problem is
PHP:
function TransferAmmoToShip()
{
if ${CorpHangarArray.IsReady}
{
if ${Entity[${CorpHangarArray.ActiveCan}].Distance} > CORP_HANGAR_LOOT_RANGE
{
call Ship.Approach ${CorpHangarArray.ActiveCan} CORP_HANGAR_LOOT_RANGE
}
}
else
{
UI:ConsoleUpdate["No Hangar Array found - nothing moved"]
return
}
Entity[${CorpHangarArray.ActiveCan}]:OpenCargo
This:FindShipCargo[CATEGORYID_CHARGE]
call This.TransferListToShip
This.CargoToTransfer:Clear[]
}
function TransferListToShip()
{
variable int QuantityToMove
variable iterator CargoIterator
This.CargoToTransfer:GetIterator[CargoIterator]
if ${CargoIterator:First(exists)}
{
call Ship.OpenCargo
if ${This.ShipHasContainers}
{
call This.TransferListToShipWithContainers
}
else
{
do
{
if (${CargoIterator.Value.Quantity} * ${CargoIterator.Value.Volume}) > ${Ship.CargoFreeSpace}
{
/* Move only what will fit, minus 1 to account for CCP rounding errors. */
QuantityToMove:Set[${Ship.CargoFreeSpace} / ${CargoIterator.Value.Volume} - 1]
}
else
{
QuantityToMove:Set[${CargoIterator.Value.Quantity}]
}
UI:UpdateConsole["TransferListToShip: Loading Cargo: ${QuantityToMove} units (${Math.Calc[${QuantityToMove} * ${CargoIterator.Value.Volume}]}m3) of ${CargoIterator.Value.Name}"]
UI:UpdateConsole["TransferListToShip: Loading Cargo: DEBUG: TypeID = ${CargoIterator.Value.TypeID}, GroupID = ${CargoIterator.Value.GroupID}"]
if ${QuantityToMove} > 0
{
UI:UpdateConsole["QuantityToMove - ${QuantityToMove}"]
CargoIterator.Value:MoveTo[MyShip,${QuantityToMove}]
wait 30
}
if ${Ship.CargoFreeSpace} < ${Ship.CargoMinimumFreeSpace}
{
UI:UpdateConsole["DEBUG: TransferListToShip: Ship Cargo: ${Ship.CargoFreeSpace} < ${Ship.CargoMinimumFreeSpace}"]
break
}
}
while ${CargoIterator:Next(exists)}
}
wait 10
}
else
{
UI:UpdateConsole["DEBUG: obj_Cargo:TransferListToShip: Nothing found to move"]
}
}
PHP:
00:11:17: -=Paused: Press Run-=
00:11:21: Resumed
00:11:22: DEBUG: obj_Ship.IsAmmoAvailable: FALSE!
00:11:22: DEBUG: obj_Ship.IsAmmoAvailable: FALSE!
00:11:22: DEBUG: obj_Ship.IsAmmoAvailable: FALSE!
00:11:22: DEBUG: obj_Ship.IsAmmoAvailable: FALSE!
00:11:22: DEBUG: obj_Ship.IsAmmoAvailable: FALSE!
00:11:22: DEBUG: obj_Ship.IsAmmoAvailable: FALSE!
00:11:22: DEBUG: obj_Ship.IsAmmoAvailable: FALSE!
00:11:22: Debug: Fleeing: Low ammo
00:11:22: ResetSafeSpotList found 1 safespots in this system.
00:11:22: func_AmmoReload: AmmoReloading - TRUE
00:11:22: func_AmmoReload: Warp to Safespot
00:11:22: Preparing for warp
00:11:24: DEBUG: obj_Cargo:FindShipCargo: CategoryID: 8 Scourge Fury Heavy Missile (200) (CargoToTransfer.Used: 0)
00:11:24: TransferListToShip: Loading Cargo: 200 units (6.000000m3) of Scourge Fury Heavy Missile
00:11:24: TransferListToShip: Loading Cargo: DEBUG: TypeID = 2629, GroupID = 655
00:11:24: QuantityToMove - 200
00:11:31: DEBUG: obj_Ship.IsAmmoAvailable: FALSE!
00:11:31: DEBUG: obj_Ship.IsAmmoAvailable: FALSE!
00:11:31: DEBUG: obj_Ship.IsAmmoAvailable: FALSE!
00:11:31: DEBUG: obj_Ship.IsAmmoAvailable: FALSE!
00:11:31: DEBUG: obj_Ship.IsAmmoAvailable: FALSE!
00:11:31: DEBUG: obj_Ship.IsAmmoAvailable: FALSE!
00:11:31: DEBUG: obj_Ship.IsAmmoAvailable: FALSE!
00:11:31: Debug: Fleeing: Low ammo
00:11:31: func_AmmoReload: AmmoReloading - TRUE
00:11:31: func_AmmoReload: Warp to Safespot
00:11:31: Preparing for warp
00:11:33: DEBUG: obj_Cargo:FindShipCargo: CategoryID: 8 Scourge Fury Heavy Missile (200) (CargoToTransfer.Used: 0)
00:11:33: TransferListToShip: Loading Cargo: 200 units (6.000000m3) of Scourge Fury Heavy Missile
00:11:33: TransferListToShip: Loading Cargo: DEBUG: TypeID = 2629, GroupID = 655
00:11:33: QuantityToMove - 200
00:11:38: Recalling Drones prior to shutdown...
Last edited: