Ran it 4 times; I couldn't figure out what was wrong.
About 5-7 Minutes later (and that's an approximation) one of the scripts finally ended, and I got my message.
Oops. Now I know there is a maximum wait cycle, for an example try
Code: Select all
= wait 7200000 ms
send message
goto start
But now it appears there's a minimum wait number too?
Code: Select all
001 *$testsc = [THIS] -> get sector
002 $sector = [PLAYERSHIP] -> get sector
003 *skip if $sector == $testsc
004 *return null
005 $allships = array alloc: size=0
006 $play = [FALSE]
007 skip if $whichfleet != null
008 return null
009 start:
010 $x = find ship: sector=$sector class or type=Cruiser M6 race=Player flags=[Find.Multiple] refobj=null maxdist=null maxnum=25 refpos=null
011 $num = 0
012 $number = size of array $x
013 skip if not $number > 0
014 $play = [TRUE]
015 while $num < $number
016 $carrier = $x[$num]
017 $Fleetnum = $carrier -> get true volume of ware Data Storage Device in cargo bay
018 if ( $whichfleet == 0 ) AND ( $Fleetnum != 0 )
019 goto label skip
020 end
021 if $whichfleet == $Fleetnum
022 skip:
023 $carID = $carrier -> get SectorObject ID
024 $test = get object from SectorObject $carID
025 $scanrange = $carID + 5000
026 while $scanrange > 1
---------Put a wait 1 ms here ----------
027 dec $scanrange =
028 if exists SectorObject $scanrange
029 $shipware = get ware type of SectorObject $scanrange
030 *if $shipware -> is of class Ship
031 $env = $scanrange -> get environment
032 skip if $env != $carrier
033 append $scanrange to array $allships
034 *end
035 end
036 end
037 end
038 $num = $num + 1
039 end
040 $rand = random value from 0 to 2 - 1
041 skip if $rand != 0
042 $sample = 896
043 skip if $rand != 1
044 $sample = 1166
045 skip if $play != [TRUE]
046 play sample $sample
047 $size = size of array $allships
048 $msg = sprintf: fmt='%s %s', $size, $test, null, null, null
049 send incoming message $msg to player: display it=[TRUE]
050 return null