problem with match using gamma moo

0 views
Skip to first unread message

Jesús Pavón

unread,
Jul 17, 2016, 9:17:59 AM7/17/16
to MOO Talk
Hi,
I'm using Version 1.8.3+gamma0 and the latest version of enCore Database.
But the matcher fails.
For example:
> get account from box
I don't recognise that command.
But...
> Get box
Taken.
> get account from box
You get Account Administration FO from Box of Educational Tools.

if a player does not have an object in the inventory, the player can not perform actions on because dobj only uses player.contents and not player.location.contents.


What I can do to fix that?

Sorry for my bad english, is not my native languaje.

Jesús Pavón

unread,
Jul 17, 2016, 12:01:37 PM7/17/16
to MOO Talk
I have found the solution. It's simple...
@verb #0:match_object none none none
@edit #0:match_object
say  object = $match_utils:match(argstr, {@player.contents, @player.location.contents});
say return object;
compile
done
@dump-d

Chris Norman

unread,
Jul 18, 2016, 5:39:54 AM7/18/16
to MOO-...@googlegroups.com

Can I suggest that:

1) You use player:contents() and player.location:contents() rather than player.contents and player.location.contents?

B) You don't need to assign object = ..., you can just return the result of the match. Not absolutely necessary, but I feel that little optimisations are important when you consider how often matching happens.


HTH,

--
You received this message because you are subscribed to the Google Groups "MOO Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to MOO-talk+u...@googlegroups.com.
To post to this group, send email to MOO-...@googlegroups.com.
Visit this group at https://groups.google.com/group/MOO-talk.
For more options, visit https://groups.google.com/d/optout.

Jesús Pavón

unread,
Jul 18, 2016, 8:08:51 AM7/18/16
to MOO Talk
I'm having other problems...
@create $comida named pizza,pizza
You now have pizza (aka pizza) with object number #226 and parent comida (#203).
@create $comida named pizza,pizza
You now have pizza (aka pizza) with object number #228 and parent comida (#203).
eat pizza
I don't understand that ("pizza" is an ambiguous name).

If i write eat 2.pizza the moo canot recognise the verb eat.
Can you give me a idea?

Chris Norman

unread,
Jul 18, 2016, 8:25:31 AM7/18/16
to MOO-...@googlegroups.com

Drop one of them? Other than that, no clue. It's been a long time! :-(

Luke Dashjr

unread,
Jul 18, 2016, 11:37:37 AM7/18/16
to MOO-...@googlegroups.com, Jesús Pavón
You could possibly do "eat first pizza" depending on how smart your match verb
is...

Jesús Pavón

unread,
Jul 18, 2016, 1:38:57 PM7/18/16
to Luke Dashjr, MOO-...@googlegroups.com
There was a bug, caused by the translation of the database at spanish.
I've fixed it, changing some properties in the object #51.
Thanks!
Reply all
Reply to author
Forward
0 new messages