I am currently trying to make a game in AGS 3.6.0 that simply has you move from one place to another by simply clicking on a hotspot, similar to something like Daymare Town or Covert Front. I initially tried to do this by creating a hotspot to with the event for "any click on hotspot" set to "player.ChangeRoom(2)", but on attempting to run it, clicking the hotspot incurs the error "RunScriptFunction: error -18 () trying to run 'player.ChangeRoom(2)' (Room 1)
You don't write the command into the events table field.
Empty the field, the click the ellipses button at the end. This will create and link the function and take you to it. Now put the command(s) inside the function.
This process is explained in the tutorial:
https://adventuregamestudio.github.io/ags-manual/acintro3.html
I may be stupid...