Spike trap issue

So I am having a problem with an event that I made for spikes. The first part of the event works, but when it gets to the second part it gives me an error.
Event:
1618873039859.png

Part that is causing problem:
$game_player.x == $game_map.events[@event_id].x && $game_player.y == $game_map.events[@event_id].y
Error Message:
1618873117683.png

Event that gets info:
1618873169131.png

How do I fix this?
Try:
Ruby:
$game_player.x == $game_map.events[event_id].x && $game_player.y == $game_map.events[event_id].y

Good luck
Try:
Ruby:
$game_player.x == $game_map.events[event_id].x && $game_player.y == $game_map.events[event_id].y

Good luck
This only goes for specific ids. The one I put is supposed to check the current event that the branch is on.
I did the exact same as this video:
I'm sorry, i tested it like this:
p event_id

Exactly returned the event ID that called it
I'm sorry, i tested it like this:
p event_id

Exactly returned the event ID that called it
p event id?
Rpg Maker -> Game -> Enable "Display Console"
Rpg Maker -> Game -> Enable "Display Console"
Ok. How did you have the branch set up though?
EDIT: Nevermind, I got it. It worked. Thank you so much, but how did it work is my question?
VXACE-Colision.png

But in fact this can be done with events only, using the "This Event" option.

Although ...
I apologize again, maybe I didn't even really understand what you're trying to do.
View attachment 186778
But in fact this can be done with events only, using the "This Event" option.

Although ...
I apologize again, maybe I didn't even really understand what you're trying to do.
What? I am confused as to what you mean.
Exactly, I did not understand the purpose of the "Conditional Branch" with Script.
Sorry, forgot the language thing. Interesting and I probably asked this before.
Thread closed

Original thread: https://forums.rpgmakerweb.com/threads/spike-trap-issue.135659/