I'm using this routine to check for harvestable nodes with checks to see if a flag is set , if it is then the routine to harvest that node is called.
What I'm finding is sometime during the looping the CustomActorarray values (name and ID) are becoming NULL when before they were previously the name of a node and it's ID..
is it this routine , a bug or something I'm missing?
Scan is a variable passed to it for the distance to scan using CreateCustomActorArray
What I'm finding is sometime during the looping the CustomActorarray values (name and ID) are becoming NULL when before they were previously the name of a node and it's ID..
is it this routine , a bug or something I'm missing?
Scan is a variable passed to it for the distance to scan using CreateCustomActorArray
Code:
function startharvest(int scan)
{
variable int harvestcount
variable int harvestloop
variable string actorname
variable int tempvar
While 1
{
if ${pauseharvest}
break
if !${Me.InCombat}
{
EQ2:CreateCustomActorArray[byDist,${scan}]
harvestloop:Set[1]
harvestcount:Set[${EQ2.CustomActorArraySize}]
do
{
actorname:Set[${CustomActor[${harvestloop}]}]
if ${CustomActor[${harvestloop}].Type.Equal[resource]} && !${actorname.Equal[NULL]}
{
tempvar:Set[1]
do
{
if ${HarvestNode[${tempvar}]}
{
if ${actorname.Equal[${NodeName[${tempvar}]}]}
{
call harvestnode ${CustomActor[${harvestloop}].ID}
break
}
}
}
while ${tempvar:Inc} <=9
}
}
while ${harvestloop:Inc} <= ${harvestcount}
}
}
}