Re: [RELEASE] Talkative Space Compass
Posted: Mon Nov 19, 2012 8:58 pm
I'll have a look at it, then.
For information and discussion about Oolite.
https://bb.oolite.space/
Code: Select all
} else if (mode == "COMPASS_MODE_PLANET") {
player.consoleMessage("Compass: "+system.name);
07:21:46.626 [script.javaScript.exception.ooliteDefined]: ***** JavaScript exception (Talkative Space Compass 1.0.3): Error: Vector3D.distanceTo: Could not construct vector from parameters (null) -- expected Vector, Entity or array of three numbers.
07:21:46.626 [script.javaScript.exception.ooliteDefined]: AddOns/TalkativeCompass_1.0.3.oxp/Config/script.js, line 68.
Have you implemented the distance fix into the TSC? If so, then the error is probably from that line.Diziet Sma wrote:On 1.77 I'm seeing this a few times in the logs..
07:21:46.626 [script.javaScript.exception.ooliteDefined]: ***** JavaScript exception (Talkative Space Compass 1.0.3): Error: Vector3D.distanceTo: Could not construct vector from parameters (null) -- expected Vector, Entity or array of three numbers.
07:21:46.626 [script.javaScript.exception.ooliteDefined]: AddOns/TalkativeCompass_1.0.3.oxp/Config/script.js, line 68.
Code: Select all
//distance to object
if (mode != "COMPASS_MODE_BASIC") {
dist = (player.ship.position.distanceTo(whom) - whom.collisionRadius)/1000;
player.consoleMessage(dist.toFixed(3)+" Klicks");
}
(whom)
is somehow returning null for some entities? (I say some, because it's clearly still working for most entities)Code: Select all
12:54:06.541 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (Talkative Space Compass 1.0.3): TypeError: whom is null
12:54:06.541 [script.javaScript.exception.unexpectedType]: AddOns/TalkativeCompass_1.0.3.oxp/Config/script.js, line 30.
Try this:Diziet Sma wrote:Well spotted.. I have:SoCode: Select all
//distance to object if (mode != "COMPASS_MODE_BASIC") { dist = (player.ship.position.distanceTo(whom) - whom.collisionRadius)/1000; player.consoleMessage(dist.toFixed(3)+" Klicks"); }
(whom)
is somehow returning null for some entities? (I say some, because it's clearly still working for most entities)
Found this as well in the current log, so yep, seems to be something along those lines.Code: Select all
12:54:06.541 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (Talkative Space Compass 1.0.3): TypeError: whom is null 12:54:06.541 [script.javaScript.exception.unexpectedType]: AddOns/TalkativeCompass_1.0.3.oxp/Config/script.js, line 30.
Code: Select all
if (!player.ship.compassTarget) return;
//distance to object
if (mode != "COMPASS_MODE_BASIC") {
dist = (player.ship.position.distanceTo(whom) - whom.collisionRadius)/1000;
player.consoleMessage(dist.toFixed(3)+" Klicks");
}
See my Updating TSC oxp, it's quite configurable via variables in the script.laxori666 wrote:Bug report: currently this conflicts with Destination ETA. If the ETA indicator is on, then the talkative description is wiped and replaced by the generic one by Destination ETA. I'm not sure which OXP would have to be modified - this one or Destination ETA or both - so I've cross-posted this. Maybe the two can be merged into one OXP? Perhaps would also be more immersive if both upgrades had to be purchased.
Ah that's something I'd want to do as well. Could you share how you tweaked your hud to show the ETA? Or share the files and I can figure it out and adapt my HUD to do the same. Would be much appreciated!spara wrote:See my Updating TSC oxp, it's quite configurable via variables in the script.laxori666 wrote:Bug report: currently this conflicts with Destination ETA. If the ETA indicator is on, then the talkative description is wiped and replaced by the generic one by Destination ETA. I'm not sure which OXP would have to be modified - this one or Destination ETA or both - so I've cross-posted this. Maybe the two can be merged into one OXP? Perhaps would also be more immersive if both upgrades had to be purchased.
Personally, I tweaked my own hud (Aad-HUD) to show ETA, as the updating function in both Updating TSC and Destination ETA uses suppresses messages when running.
It's a feature of the latest version of the Aad-HUD. Get it from the wiki.laxori666 wrote:Ah that's something I'd want to do as well. Could you share how you tweaked your hud to show the ETA? Or share the files and I can figure it out and adapt my HUD to do the same. Would be much appreciated!
So it is - thanks!spara wrote:It's a feature of the latest version of the Aad-HUD. Get it from the wiki.laxori666 wrote:Ah that's something I'd want to do as well. Could you share how you tweaked your hud to show the ETA? Or share the files and I can figure it out and adapt my HUD to do the same. Would be much appreciated!