Griff Krait v.1.1 Java exceptions

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Dr Beeb
Dangerous
Dangerous
Posts: 127
Joined: Sun Mar 23, 2008 10:28 pm
Location: Mt. Vista, Oosa, Biarge System, Galaxy 1

Griff Krait v.1.1 Java exceptions

Post by Dr Beeb »

Busy running debugger for other reasons and noticed these when the Griff Krait came up and I had shot bits off of it. Dont know if they need to be dealt with?
-------------


Exception: Error: Vector3D.distanceTo: Could not construct vector from parameters ([object Player]) -- expected Vector, Entity or array of three numbers.
Active script: "griff_krait_fuel_injectors" 1.00
griff_krait_fuel_injectors.js, line 9:
if(this.ship.owner.position.distanceTo(player) < 25600) player.commsMessage("There goes my fuel injector.", 5);
Exception: Error: Vector3D.distanceTo: Could not construct vector from parameters ([object Player]) -- expected Vector, Entity or array of three numbers.
Active script: "griff_krait_fuel_injectors" 1.00
griff_krait_fuel_injectors.js, line 9:
if(this.ship.owner.position.distanceTo(player) < 25600) player.commsMessage("There goes my fuel injector.", 5);
Exception: Error: Vector3D.distanceTo: Could not construct vector from parameters ([object Player]) -- expected Vector, Entity or array of three numbers.
Active script: "griff_krait_fuel_injectors" 1.00
griff_krait_fuel_injectors.js, line 9:
if(this.ship.owner.position.distanceTo(player) < 25600) player.commsMessage("There goes my fuel injector.", 5);
White dots were so much easier to hit
User avatar
stevesims
Dangerous
Dangerous
Posts: 78
Joined: Wed Jun 23, 2004 4:07 am
Location: London, England

Post by stevesims »

Repeat after me, ten times...

Java != JavaScript
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

& I'd say (player) should become (player.ship.position) ...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

I think i've fixed this now by simply deleting line 9 of the script (line 9 just sent the player a comms message from the krait so i don't think it was that vital), i've updated the oxp - same download link as before ( http://www.box.net/shared/ik9j0fi5co )
Post Reply