Author Topic: "Unknown command getHackPosition." (resolved, use %obj.getPostion() )  (Read 919 times)

Add-Ons/Player_Pilot/Player_Pilot.cs (154): Unknown command getHackPosition.
  Object pilotDoublejumpProjectile(1702) pilotDoublejumpProjectile -> ProjectileData -> ProjectileData -> ProjectileData -> ProjectileData -> ProjectileData -> ProjectileData -> GameBaseData -> SimDataBlock -> SimObject -> SimObject


Despite this, the sound is playing perfectly fine out of where it should be.

function pilotDoublejumpProjectile::onExplode(%this,%obj)
{
   %num = getRandom(1, 3);
   serverPlay3D( pilotDoublejump @ %num @ Sound, %this.getHackPosition() );
   parent::onExplode(%this,%obj);
}


It's not really a big issue, but the console spam is annoying as I attempt to find and fix actual bugs. What's up with this?
« Last Edit: August 12, 2014, 10:12:46 PM by Taboo »

Pretty sure getHackPosition is only a Player method; use getPosition instead

Weird, I've always used getHackPosition for special projectile sounds before. Will try, thanks.

Sound doesn't play now, console gives the same error but for getPosition instead.
Sound plays, console still spams. I had forgotten to remove %this.
« Last Edit: August 12, 2014, 10:07:49 PM by Taboo »

Isn't %this the datablock and %obj the projectile?

Isn't %this the datablock and %obj the projectile?
Yes, this, silly me
Call getPosition on %obj, not %this

Looks like that was the issue indeed. Thanks fellas, locking.