Syntax Error, Unexpected end of input

● ARCHIVED · READ-ONLY
Started by Berylstone 4 posts View original ↗
  1. 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?
  2. 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.
  3. $gamePlayer.isMoving() === true

    got ninja'd :<
  4. Zalerinian said:
    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.