Project

General

Profile

Bug #2220

Probe Scanner Distance = NULL

Added by jsmb768ypl over 1 year ago. Updated 4 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
broken feature(s)
vbulletin_issue_id:

Description

Hello,

I am trying to see if we can get the distance in the probe window. The reason this would be needed is for running anom sites. 

Right now if you were to run the script below you would get data for each item but the Distance would read back as NULL

I have attached a screen shot of what should be shown (if possible). I have even warped to an anom and re-ran the script (since now I am less then 100km away from the site) and it still comes back NULL.

To repreduce this, you would need to do the following:
- Be in any ship
- Be in space (System must have at least 1 anomaly
- Open the Probe Scanner window (Alt + P) (confirm you are not filtering anything out specifically anomalies)
- Run the below script (I also tried ${MyAnomalies_Iterator.Value.Distance}  but that came back null as well)

function main()
{
	variable index:systemanomaly MyAnomalies
	variable iterator MyAnomalies_Iterator
	
	MyShip.Scanners.System:GetAnomalies[MyAnomalies]
	MyAnomalies:GetIterator[MyAnomalies_Iterator]
	
	if ${MyAnomalies_Iterator:First(exists)}
	{			
		do
		{			
			echo ${Time}: ------------------ ${MyAnomalies_Iterator.Value.Name} ------------------
			echo ${Time}: ID: ${MyAnomalies_Iterator.Value}
			echo ${Time}: Difficulty: ${MyAnomalies_Iterator.Value.Difficulty}
			echo ${Time}: DungeonID: ${MyAnomalies_Iterator.Value.DungeonID}
			echo ${Time}: DungeonName: ${MyAnomalies_Iterator.Value.DungeonName}
			echo ${Time}: Faction: ${MyAnomalies_Iterator.Value.Faction}
			echo ${Time}: FactionID: ${MyAnomalies_Iterator.Value.FactionID}
			echo ${Time}: Group: ${MyAnomalies_Iterator.Value.Group}
			echo ${Time}: GroupID: ${MyAnomalies_Iterator.Value.GroupID}
			echo ${Time}: IsWarpable: ${MyAnomalies_Iterator.Value.IsWarpable}
			echo ${Time}: ScanStrength: ${MyAnomalies_Iterator.Value.ScanStrength}
			echo ${Time}: SignalStrength: ${MyAnomalies_Iterator.Value.SignalStrength}
			echo ${Time}: ToEntity.Distance: ${Entity[${MyAnomalies_Iterator.Value}].Distance}			
		}
		while ${MyAnomalies_Iterator:Next(exists)}
	}
}
#1

Updated by Amadeus 4 months ago

This line is bad code, in and of itself:

       echo ${Time}: ToEntity.Distance: ${Entity[${MyAnomalies_Iterator.Value}].Distance}	

It should be changed to:
if (${Entity[${MyAnomalies_Iterator.Value}](exists)})
{
    echo ${Time}: ToEntity.Distance: ${Entity[${MyAnomalies_Iterator.Value}].Distance}
}

That way it will only return a valid value if the anomaly is actually available as an entity.

Also available in: Atom PDF