Jet's smart A* pathfinder script

tylerexists10101

A Tired Person
Veteran
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.
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
281
Reaction score
106
First Language
English
Primarily Uses
RMXP
Line 1411 points to the eval call, which would be caused by one of your event's script calls. Not sure what you're going on about saying it's something else.

Screenshots of your events would be preferred. Also giving step-by-step reproducible instructions.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

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.

Forum statistics

Threads
105,868
Messages
1,017,090
Members
137,587
Latest member
Usagiis
Top