What is wrong with my script?

● ARCHIVED · READ-ONLY
Started by Kalombi 5 posts View original ↗
  1. Per the you tube zoom tutorial, here is my script:


    Var xPos = $gamePlayer.screenX();
    Var yPos = $gamePlayer.screenY();
    $gameScreen.startZoom(xPos, yPos, 2.0, 300);

    Here is my error message:
    Syntax Error
    Unexpected Identifier

    What went wrong?
  2. I tried just removing the Var part of your variable declarations and that fixed it

    Revised Script
    Code:
    xPos = $gamePlayer.screenX();
    yPos = $gamePlayer.screenY();
    $gameScreen.startZoom(xPos, yPos, 2.0, 300);
  3. or maybe use var instead of Var?
  4. Removing the Var worked!

    Thanks!!
  5. 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.