Syntax Error, Unexpected end of input

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
In RPG maker VX Ace I would use Conditional Branch: Script: $game_player.moving? to check if the player was moving or not.

When I attempt to use this on MV i keep getting this error.

Does anyone know the correct way to write this script condition on MV?
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
There are a few differences in JavaScript compared to ruby. One of them is that question marks are no long valid parts of function names. It's interpreting that as an inline if statement. Also, $game_player has been changed to $gamePlayer, as the standard naming convention in JS is different than in ruby.

All that aside, the answer that you seek is:

$gamePlayer.isMoving()Yes, you need those two empty parenthesis! That's another difference in javascript. In Ruby, adding them was optional. In JavaScript, not having them may not explicitly crash the game, but it will not work as you expect it to.
 

Baka-chan

☆*:.。. o(≧▽≦)o .。.:*☆
Veteran
Joined
Dec 19, 2012
Messages
490
Reaction score
148
First Language
German
$gamePlayer.isMoving() === true

got ninja'd :<
 
Last edited by a moderator:

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
There are a few differences in JavaScript compared to ruby. One of them is that question marks are no long valid parts of function names. It's interpreting that as an inline if statement. Also, $game_player has been changed to $gamePlayer, as the standard naming convention in JS is different than in ruby.

All that aside, the answer that you seek is:

$gamePlayer.isMoving()Yes, you need those two empty parenthesis! That's another difference in javascript. In Ruby, adding them was optional. In JavaScript, not having them may not explicitly crash the game, but it will not work as you expect it to.
That worked perfectly.  Thank you very much.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,035
Messages
1,018,450
Members
137,820
Latest member
georg09byron
Top