Turn Towards Event script call from this forums not working! Please help!

I am trying to have the player turn to an event. I found this topic here: https://forums.rpgmakerweb.com/index.php?threads/player-turns-towards-event.39846/

However, @Trihan 's answer is not working for me. Their method crashes my game every time the script call executes!

Their response tells me to use this script call: turn_toward_character($game_map.events[id of the event you want to turn toward])

So, I made it: turn_toward_character($game_map.events[009])

And it crashes my game every time it calls that script. There definitely is an event with an ID of 009. The party is talking to him.

There must be something I am missing. The OP of that thread is not complaining about any kind of crash but I am having a crash every time

Stack Trace:
Code:
Game_Character:180:in `eval': (eval):1: Invalid octal digit
turn_toward_character($game_map.events[009])
                                          ^, SyntaxError
    from Game_Character:180:in `process_move_command'
    from Game_Character:124:in `update_routine_move'
    from Game_Character:112:in `update_stop'
    from Game_CharacterBase:279:in `update'
    from Game_Player:303:in `update'
    from Mapshot:393:in `update'
    from Scene_Map:63:in `update'
    from Scene_Base:14:in `main'
    from SceneManager:23:in `run'
    from Mapshot:986:in `run'
    from Backtrace:10:in `block in <main>'

Does anybody know what the problem could be? Can someone please help me figure this out? Thank You.
You've put leading zeroes in your event ID. Just put $game_map.events[9]
Thank you. That fixed it. I was confused because it says ID:009 in the event window so I thought I needed 009 as the number.
Thank you. That fixed it. I was confused because it says ID:009 in the event window so I thought I needed 009 as the number.
I think it's just like that in the editor so that there's uniform spacing on the IDs, but in the actual code prefixing a value with 0 turns it into an octal digit (which is why you were getting that error) For example, 071 is actually octal for the decimal 57 (one 1, seven 8s)

Original thread: https://forums.rpgmakerweb.com/threads/turn-towards-event-script-call-from-this-forums-not-working-please-help.161522/