- Joined
- Nov 7, 2018
- Messages
- 34
- Reaction score
- 2
- First Language
- English
- Primarily Uses
- RMVXA
I'm currently using Jet's smart A* pathfinder script.
This is the command:
find_path($game_player.x, $game_player.y, 3)
It seemed to be working fine, however when my entity/event switched to "approach" mode and no longer user the script(different event page, same event) AND my player was in the transparent mode, I got this exception, as well as a crash:
Script 'Game Interpreter' line 1411 Name Error Occurred.
Undeclared or local variable x not found for 'Game_Interpreter:0x108caf68'
Just for reference so that nobody trying to help me has to go look at their GI scripts, here's around where the problem is said to be by my own intuition, since the problem protocol showed me the wrong line. 1411 is the end line, not the problem area. Here:
#--------------------------------------------------------------------------
# * Get Location Info
#--------------------------------------------------------------------------
def command_285
if @params[2] == 0 # Direct designation
x = @params[3]
y = @params[4]
else # Designation with variables
x = $game_variables[@params[3]]
y = $game_variables[@params[4]]
end
case @params[1]
when 0 # Terrain Tag
value = $game_map.terrain_tag(x, y)
when 1 # Event ID
value = $game_map.event_id_xy(x, y)
when 2..4 # Tile ID
value = $game_map.tile_id(x, y, @params[1] - 2)
else # Region ID
value = $game_map.region_id(x, y)
end
$game_variables[@params[0]] = value
end
There are a multitude of potential issue-causers, in short. If anyone could steer me in the right direction, that would be great.
*Note: I tested it, and the error is not caused by the path of the event running the aforementioned command being severed. It has to be something else. The reason for the transparency is for a hiding function. I know no other way of changing ev -1's opacity.
This is the command:
find_path($game_player.x, $game_player.y, 3)
It seemed to be working fine, however when my entity/event switched to "approach" mode and no longer user the script(different event page, same event) AND my player was in the transparent mode, I got this exception, as well as a crash:
Script 'Game Interpreter' line 1411 Name Error Occurred.
Undeclared or local variable x not found for 'Game_Interpreter:0x108caf68'
Just for reference so that nobody trying to help me has to go look at their GI scripts, here's around where the problem is said to be by my own intuition, since the problem protocol showed me the wrong line. 1411 is the end line, not the problem area. Here:
#--------------------------------------------------------------------------
# * Get Location Info
#--------------------------------------------------------------------------
def command_285
if @params[2] == 0 # Direct designation
x = @params[3]
y = @params[4]
else # Designation with variables
x = $game_variables[@params[3]]
y = $game_variables[@params[4]]
end
case @params[1]
when 0 # Terrain Tag
value = $game_map.terrain_tag(x, y)
when 1 # Event ID
value = $game_map.event_id_xy(x, y)
when 2..4 # Tile ID
value = $game_map.tile_id(x, y, @params[1] - 2)
else # Region ID
value = $game_map.region_id(x, y)
end
$game_variables[@params[0]] = value
end
There are a multitude of potential issue-causers, in short. If anyone could steer me in the right direction, that would be great.
*Note: I tested it, and the error is not caused by the path of the event running the aforementioned command being severed. It has to be something else. The reason for the transparency is for a hiding function. I know no other way of changing ev -1's opacity.

