Page 1 of 1

Object name command phrase mismatch

PostPosted: Sun Feb 11, 2018 10:08 am
by DazaKiwi
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:

Re: Object name command phrase mismatch

PostPosted: Tue Apr 10, 2018 4:11 pm
by Campbell
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.