Immobilising the player

JacobStack
28 Apr 2018, 21:42

Hi All.
I want to be able to immobilise my player when he/she decides to wear a certain object. The option to re-write the go-to command as discussed here: http://docs.textadventures.co.uk/quest/guides/immobilise_the_player.html could be implemented perfectly, but when I follow the instructions I just get an error message. I'm not sure if this is because Quest has since been updated but I don't have enough know-how to correct the issue. Can anyone help??

This is the error message if it helps:
Error running script: Error evaluating expression 'IsRegexMatch(cmd.pattern, command, cmd.name)': parsing "^go to (?.)$|^go (?.)$|^(?north|east|south|west|northeast|northwest|southeast|southwest|in|out|up|down|n|e|s|w|ne|nw|se|sw|o|u|d)$" - Unrecognized grouping construct.


Doctor Agon
28 Apr 2018, 22:03

Hi, It should read as follows:
^go to (?<exit>.*)$|^go (?<exit>.*)$|^(?<exit>north|east|south|west|northeast|northwest|southeast|southwest|in|out|up|down|n|e|s|w|ne|nw|se|sw|o|u|d)$
Hope this helps


mrangel
28 Apr 2018, 22:06

The pattern for the command is wrong. The pattern should be:
^go to (?<exit>.*)$|^go (?<exit>.*)$|^(?<exit>north|east|south|west|northeast|northwest|southeast|southwest|in|out|up|down|n|e|s|w|ne|nw|se|sw|o|u|d)$

In that page, it includes the <exit>s, but the browser can't tell if they're part of the text or supposed to be HTML.