The place to discuss the ADRIFT Interactive Fiction toolkit

Object name command phrase mismatch

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.

Object name command phrase mismatch

Postby DazaKiwi » Sun Feb 11, 2018 10:08 am

I am rewriting a shopkeeper system which is much more simpler than previous versions. Ive sorted out the buy tasks and now have a problem with creating sell task. The following is written in the General Task box: [sell/trade] %object% to/with] %character%
When i type the command in runner: sell the guide to fishing to trader
Runner responds with 'I did not understand the word 'fishing'

The book item is called 'The guide to fishing', and what i think is happening is, it is matching the first instance of 'to' as being part of the command structure when its actually part of the object name. To make sure it works, i also called the book, 'book' and entered sell book to trader and it worked fine as intended.

So how do i get around the fact the name of the item has the word 'to' in it which the task also matches to the command structure? simple solution would be rename the book Fishing Guide. But I'm interested to know how to solve this problem for future instances where this might be problem. :anyone:
User avatar
Posts: 563
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 16

Re: Object name command phrase mismatch

Postby Campbell » Tue Apr 10, 2018 4:11 pm

Hmm, that's the problem with regular expressions. I think you have an alias on the object as "guide", and so it's matching that to the referenced object leaving "to fishing to trader" as the remainder of the command.

A simple way to resolve this is to just add a synonym to replace "guide to fishing" with "guide". This will convert the command "sell the guide to fishing to trader" to "sell the guide to trader" and should execute as you expect.
ADRIFT Developer developer.
User avatar
Site Admin
Posts: 4620
Joined: Sun Jun 23, 2002 11:05 am
Location: Edinburgh, Scotland

Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 2 guests