Problems with Index method insert.

Makca1

Active Member
Hello. I have two indexes

variable index:entity Targets
variable iterator Target
variable index:entity Bubbles
variable iterator Bubble

EVE:DoGetEntities[Targets, CategoryID, CATEGORYID_ENTITY, radius, ${_Me.Ship.MaxTargetRange}]

EVE:DoGetEntities[Bubbles, CategoryID, CATEGORYID_DEPLOYABLE, radius, ${_Me.Ship.MaxTargetRange}]


Each index is not empty.

Bubbles:GetIterator[Bubble]

if ${Bubble:First(exists)}
{
do
{

Targets:Insert[Bubble.Value]
}
while ${Bubble:Next(exists)}
}

I can't understand why Targets:Insert[Bubble.Value] returns NULL and don't add Bubble.Value to Targets index?
Bubble.Value.Name in loop returns right name of object.
 

CyberTech

Second-in-Command
Staff member
Hello. I have two indexes
Code:
variable index:entity Targets 
variable iterator Target 
variable index:entity Bubbles 
variable iterator Bubble 

EVE:DoGetEntities[Targets, CategoryID, CATEGORYID_ENTITY, radius, ${_Me.Ship.MaxTargetRange}] 

EVE:DoGetEntities[Bubbles, CategoryID, CATEGORYID_DEPLOYABLE, radius, ${_Me.Ship.MaxTargetRange}]
Each index is not empty.
Code:
[B]Bubbles:GetIterator[Bubble] 

if ${Bubble:First(exists)} 
{ 
do 
{ 

Targets:Insert[Bubble.Value] 
} 
while ${Bubble:Next(exists)} 
} 
[/B]
I can't understand why Targets:Insert[Bubble.Value] returns NULL and don't add Bubble.Value to Targets index?
Bubble.Value.Name in loop returns right name of object.
you want ${Bubble.Value} -- anything without ${} is just text. The param when it's passed into GetEntities is a special case.
 
Top Bottom