Ahh, further back than a month and below the fold back into August, excellent. Will have it then.Kaks wrote:20:30, 25 August 2009 (hist) (diff) Oolite JavaScript Reference: Timer
20:13, 25 August 2009 (hist) (diff) Oolite JavaScript Reference: Timer
Are both on that list, and seem to refer to timers. It might be what Eric is referring to.
Updated OSE NPC timer scripts
Moderators: winston, another_commander, Getafix
-
- ---- E L I T E ----
- Posts: 389
- Joined: Sat Sep 26, 2009 2:14 pm
- Location: Christchurch, New Zealand
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
even the Grim Reaper keeps his distance.
-- Paul Wilkins
-
- ---- E L I T E ----
- Posts: 389
- Joined: Sat Sep 26, 2009 2:14 pm
- Location: Christchurch, New Zealand
The OSE NPC timer scripts have been made, and are ready to be downloaded and tested.
ose npc timer scripts.7z
ose npc timer scripts.7z
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
even the Grim Reaper keeps his distance.
-- Paul Wilkins
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Probably the current workaround is also okay, as the main reason for crashes is that a timer tries to change properties of a removed script and that is also handled in your case.pmw57 wrote:Ahh, further back than a month and below the fold back into August, excellent. Will have it then.
But when testing if the ship itself is still present and valid shows better why the test is executed.
I remember from testing a year ago that even when the ship was removed, this.ship was sometimes true as an object with as only property the isValid property. Therefor the double check.
scrip is a property of this.ship. this.cloakedTarget is a property of the script. You and Kaks are much more experienced with JS than I am but if script does not exist I don't know what if (this.cloakedTarget && !this.cloakedTarget.isCloaked) does.
I know that this.cloakedTarget is identical to this ship.script.cloakedTarget. You can access ship.script properties from outside scripts by examining the script property of a ship.
UPS-Courier & DeepSpacePirates & others at the box and some older versions