[Prev][Next][Index][Thread]

# Re: Coding Problem

- Date: Thu, 28 Dec 1995 17:02:22 PST
- From:
- Cc: MOO-Cows@parc.xerox.com
- In-reply-to: "James Renken"'s message of "Thu, 28 Dec 1995 14:21:04 PST" <30e3185001bb002@gold.tc.umn.edu>

    James Renken writes:
    > How do I make the following code work?  Right now, it just gives me the
    > "ERROR: Could not access text on object." every time.
    >
    > otret = $string_utils:explode(args[1], "?")[1];
    > otrargs = $string_utils:explode($string_utils:explode(args[1], "?")[2], ",");
    > if ($object_utils:has_callable_verb(otret, "return_text"))
    >   if (typeof(otrargs) != ERR)
    >     otret:return_text(@otrargs);
    >   else
    >     otret:return_text();
    >   endif
    > else
    >   notify(player, "ERROR: Could not access text on object.");
    >   move(otret, otret.owner);
    > endif

    The call to $object_utils:has_callable_verb() will always fail because `otret'
    is always a string (since it's part of the result of $string_utils:explode()).
    Perhaps you should use toobj() on it.

    	  Pavel

References:

- Coding Problem

- From: "James Renken" <renk0006@gold.tc.umn.edu>

- Prev: Coding Problem
- Next: Correction
- Index: MOO-cows
- Thread: MOO-cows

Home | Subject Index | Thread Index