problem with match using gamma moo

已查看 0 次
跳至第一个未读帖子

Jesús Pavón

未读,
2016年7月17日 09:17:592016/7/17
收件人 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

未读,
2016年7月17日 12:01:372016/7/17
收件人 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

未读,
2016年7月18日 05:39:542016/7/18
收件人 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

未读,
2016年7月18日 08:08:512016/7/18
收件人 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

未读,
2016年7月18日 08:25:312016/7/18
收件人 MOO-...@googlegroups.com

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

Luke Dashjr

未读,
2016年7月18日 11:37:372016/7/18
收件人 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

未读,
2016年7月18日 13:38:572016/7/18
收件人 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!
回复全部
回复作者
转发
0 个新帖子