Code: Select all
$current.sector = $arg.start
$next.sector = $arg.start
while $next.sector != $arg.finish
do if $debug
= wait 1 ms
$next.sector = get next sector on route from sector $current.sector to sector $arg.finish
$current.sector = $next.sector
skip if $next.sector->exists
return [FALSE]
if not $config.explore
skip if $next.sector->is sector known by the player
return [FALSE]
end
$next.sector.owner = $next.sector->get owner race
$this.relations = [THIS]->get relation to race $next.sector.owner
skip if $debug < 3
write to log file $pageId append=[TRUE] printf: fmt='In check.path next sector loop: sector= "%s" owner= "%s" relations="%s"', $next.sector, $next.sector.owner, $this.relations, null, null
if $config.relations AND $this.relations == {Foe}
do if $debug
write to log file $pageId append=[TRUE] value='In check.path: no path found'
return [FALSE]
end
end
do if $debug
write to log file $pageId append=[TRUE] value='In check.path: Path is flyable'
return [TRUE]
I have no idea what I'm reading. Can anyone more knowledgeable in scripting tell me if there is an easy fix (to avoid enemy sectors)?
Code: Select all
if $config.relations AND $this.relations == {Foe}
do if $debug
write to log file $pageId append=[TRUE] value='In check.path: no path found'
end
end
do if $debug
write to log file $pageId append=[TRUE] value='In check.path: Path is flyable'