What is wrong with my script?

Status
Not open for further replies.

Kalombi

Villager
Member
Joined
Oct 10, 2018
Messages
5
Reaction score
0
First Language
English
Primarily Uses
N/A
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?
 

nakina

Dat boi
Veteran
Joined
Sep 17, 2016
Messages
37
Reaction score
21
First Language
English
Primarily Uses
RMMV
I tried just removing the Var part of your variable declarations and that fixed it

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

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
or maybe use var instead of Var?
 

Kalombi

Villager
Member
Joined
Oct 10, 2018
Messages
5
Reaction score
0
First Language
English
Primarily Uses
N/A
Removing the Var worked!

Thanks!!
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,842
Reaction score
5,225
First Language
Dutch
Primarily Uses
RMXP

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.

 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,574
Latest member
nikisknight
Top