Jump to content

Papyrus Script Error " (...)+ loop did not match anything at input 'native' "


slasham

Recommended Posts

Hi,

 

Just wondering if anybody could help me with my script. I'm trying to make a boat rotate when its steering wheel is activated. I've had a few errors and managed to get rid of most of them but can't seem to get rid of this last pesky error.

The error is (...)+ loop did not match anything at input 'native'

If you could explain what the error means then this would also be greatly appreciated for next time.

My current code is as follows:

 

Scriptname BoatRight extends ObjectReference
Event OnActivate(ObjectReference akActionRef)
Debug.MessageBox("Turn Right")
ThisObject.TranslateTo(ThisObject.GetPositionX, ThisObject.GetPositionY,ThisObject.GetPositionZ,ThisObject.GetAngleX + 10, ThisObject.GetAngleY, ThisObject.GetAngleZ, 100.0, 0.0) native
endEvent
Thanks in advance,
Slasham.
Link to comment
Share on other sites

Few probs I see there.

 

GetPosition needs parenthesis.

eg: GetPositionX(), GetPositionY(), GetPositionZ()

 

Also there is no ThisObject declared in your script.

 

If your wanting to check the object the script is attached to then use Self.

eg:

Scriptname BoatRight extends ObjectReference  

Event OnActivate(ObjectReference akActionRef)
Debug.MessageBox("Turn Right")
Self.TranslateTo(Self.GetPositionX(), Self.GetPositionY(), Self.GetPositionZ(), Self.GetAngleX() + 10, Self.GetAngleY(), Self.GetAngleZ(), 100.0, 0.0)
endEvent

 

Or

 

You can even omit self altogether and just use the function and it will treat it as self.

eg:

Scriptname BoatRight extends ObjectReference  

Event OnActivate(ObjectReference akActionRef)
Debug.MessageBox("Turn Right")
TranslateTo(GetPositionX(), GetPositionY(),GetPositionZ(),GetAngleX() + 10, GetAngleY(), GetAngleZ(), 100.0, 0.0)
endEvent
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...