-Upgrading LambdaCore to 1.8.0-
$command_utils:explain_syntax If a person types in a command with the wrong arguments, the huh parser will look for the correct syntax on verbs around the player... here's a corrected version of it. @program $command_utils:explain_syntax ":explain_syntax(here,verb,args)"; verb = args[2]; for x in ({player, args[1], @valid(dobj) ? {dobj} | {}, @valid(iobj) ? {iobj} | {}}) what = x; while (hv = $object_utils:has_verb(what, verb)) what = hv[1]; i = 1; while (i = $code_utils:find_verb_named(what, verb, i)) if (evs = $code_utils:explain_verb_syntax(x, verb, @verb_args(what, i))) player:tell("Try this instead: ", evs); return 1; endif i = i + 1; endwhile what = parent(what); endwhile endfor return 0; .
-19-
[Previous Page][Next Page][Contents]