MZ Error with Dot Move system, "SyntaxError Unexpected identifier"

I'm using the Dot move system, and I'm trying to put the character's angle relative to an event in a variable.



I set this up
Capt3ure.PNG


I'm getting this error:

Capture2.PNG

Capture3.PNG



Does anyone know what the issue is?

Thank you.
That's not correct JavaScript syntax.

That's a way that people type when they're referring to a function that's a method of a class, but none of that is actually usable in code.

If you're getting the angle off the player, then your point of reference for the character is $gamePlayer.

I'm not certain that you mean what you say when you say you have "an event in a variable" - do you actually have some variable defined as player that has an event stored in it?

If yes, you can do $gamePlayer.calcDeg(player) but perhaps you can show how you're getting this event that's stored in a variable to make sure that's correct.
Hm, I'm having a hard time explaining this.

In the Dot move documentation, there's this
Capture.PNG


I'm trying to get the player's relative position to an event, and than take that angle and store it in a variable.

EDIT
I think I got it working, thank you!

EDIT 2

This is what I used, for anyone who's interested.

$gamePlayer.calcDeg(this.character(0)) - 180
Ah, I didn't understand that you were running the code from the event that you wanted to get the angle to.

Glad you got it working.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/error-with-dot-move-system-syntaxerror-unexpected-identifier.168619/