VX Ace to MV Error: $game_player is not defined

2d_quest

Veteran
Veteran
Joined
Oct 18, 2013
Messages
60
Reaction score
7
First Language
English
Primarily Uses
I'm converting a VX Ace to MV and got this error.


error: $game_player is not defined


A common event of mine uses $game_player.x and $game_player.y. Is the variable referring to the player your currently control at the front of the line different in MV than VX Ace?  If so what is it now?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
@2d_quest as said in the description of the Ace to MV converter script, EVERYTHING that touches the scripting needs to be manually converted or replaced with it's javascript equivalent of MV.


That not only includes full scripts, but every use of the event command "script" and every line where script commands are used (including the script-options of conditional branches and control variables as well as all damage formulae that goe beyond basic mathematics).


So yes, the Variable names of the engine have been renamed to conform now to javascript instead of RGSS - not only the case you listed, but every case.
 

2d_quest

Veteran
Veteran
Joined
Oct 18, 2013
Messages
60
Reaction score
7
First Language
English
Primarily Uses
@2d_quest as said in the description of the Ace to MV converter script, EVERYTHING that touches the scripting needs to be manually converted or replaced with it's javascript equivalent of MV.


That not only includes full scripts, but every use of the event command "script" and every line where script commands are used (including the script-options of conditional branches and control variables as well as all damage formulae that goe beyond basic mathematics).


So yes, the Variable names of the engine have been renamed to conform now to javascript instead of RGSS - not only the case you listed, but every case.


Does Javascript not allow underscores or something? Seems like the only reason you'd have to change $game_player to $gamePlayer just because it's Javascript.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
In programming languages, $gamePlayer and $game_player are different variables.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Does Javascript not allow underscores or something? Seems like the only reason you'd have to change $game_player to $gamePlayer just because it's Javascript.


Variable naming conventions.
 

2d_quest

Veteran
Veteran
Joined
Oct 18, 2013
Messages
60
Reaction score
7
First Language
English
Primarily Uses
Two more things I need to correct for MV are these below in script pieces. What coding grammar fixes needed here? I know $game_map will be $gameMap in the first one, but what's the rest become?


$game_map.events[@event_id].direction == 2


instance_eval("@priority_type = 1")
 
Last edited by a moderator:

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

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
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

Forum statistics

Threads
105,868
Messages
1,017,074
Members
137,578
Latest member
JamesLightning
Top