Screenshots of code... haven't seen those in a long time
Please post code in text form. Like this:
Code: ags
Anyway, it's a very common beginner's problem: you typed or pasted the function into the script yourself and therefore AGS doesn't know it exists. You need to open the room's event pane (thunderbolt icon) and link the function by pasting its name into the field next to the event. Check the event pane in the room where it's working to see how it's supposed to be set up.
(See also https://adventuregamestudio.github.io/ags-manual/acintro3.html#adding-some-interaction)

Please post code in text form. Like this:
function abc() {
Display("ABC");
}
Anyway, it's a very common beginner's problem: you typed or pasted the function into the script yourself and therefore AGS doesn't know it exists. You need to open the room's event pane (thunderbolt icon) and link the function by pasting its name into the field next to the event. Check the event pane in the room where it's working to see how it's supposed to be set up.
(See also https://adventuregamestudio.github.io/ags-manual/acintro3.html#adding-some-interaction)