If it was just a bit of bad coding that I could understand, but the exact same code in two different systems producing different results? That's just strange. On his machine (xp I believe) the code works perfectly well, on mine (win98se, everything else in the new version works fine btw) well it's basically as useful as a "hello world" program.
I'll post the whole extension just for that sake of it.
Code: Select all
<?xml version="1.0" ?>
<!DOCTYPE TranscendenceExtension
[
<!ENTITY itOrescanner "0xD0B11000">
]>
<TranscendenceExtension UNID="0xD0B11200" version="0.99a">
<ItemType UNID="&itOrescanner;"
name= "Ore Scanner"
level= "5"
value= "7000"
mass= "1"
frequency= "uncommon"
modifiers= "Consumable"
description= "This device scans for ore in asteroids and can be used again."
charges= "1"
valueCharges= "true"
>
<Image imageID="&rsItems1;" imageX="192" imageY="96" imageWidth="96" imageHeight="96"/>
<Invoke>
(block (miningAsteroids guessAsteroid)
(setq miningAsteroids (sysFindObject gSource "t:asteroid"))
(setq miningAsteroids (filter miningAsteroids asteroid (objGetItems asteroid "*U +Ore")))
(loop miningAsteroids
(block nil
(setq guessAsteroid (item miningAsteroids 0))
(setq miningAsteroids (filter miningAsteroids asteroid (ls (objGetDistance asteroid gSource) (objGetDistance guessAsteroid gSource))))
)
)
(objSetName guessAsteroid "Ore Detected")
(objSetIdentified guessAsteroid)
(objSendMessage gPlayership guessAsteroid "Ore detected!")
(shpCancelOrders gPlayership)
(shpOrder gPlayership 'dock guessAsteroid)
)
</Invoke>
</ItemType>
</TranscendenceExtension>