Quick scripting/variable problem

This is probably going to seem really obvious to an experienced scripter, but I've been away from MV for a couple of months.

Please have a look at the image; when I run the game, that text printout says "0 - 0", even though I've just stored the position of a moving event on the previous line (this is a parallel process which runs over and over again, and it never changes).

Anyone know why it's doing this, instead of just showing the x/y positions of the event?
Try replacing $game_map with $gameMap. 🙂

Edit: also, it's one of:

Code:
$gameMap.events()[id];
$gameMap.event(id);
$gameMap._events[id];

The second is probably best suited though.
Hi!
The right code is:
"$gameMap.event(ID).x" 🙂

It is case sensitive, and it's not an array in that case, so you have to use () instead of [].
The use of "[]" is when you type $dataMaps.events[ID] ^^
and since you're asking for the coordinate of a specific event, you don't even have to use scripting.
you could just use
control variable > game data > Character > EV001 > Map X
to get the number without any risk of spelling errors.

Original thread: https://forums.rpgmakerweb.com/threads/quick-scripting-variable-problem.118985/