On Sun, 28 Apr 1996, William Karp wrote:
> I created an object, and made a spec proc for it. it works fine, but
> every time I type insert (that's the command that works the object) it
> performs what it's supposed to, then it gives the char an error saying
> sorry, you can't do that here!.. or something like that.
>
> I started looking at some of the other spec_procs to see what I did
> wrong, and the one I was looking at was the bank's balance command. It
> returns a 1. Whenever I try to return a 1 it just seems to hang.(I can
> type things in and it keeps giving me the > prompt back, but nothing
> happens) I even tried disconnecting and reconnecting and it sends me
> right back into the same loop.
Try doing it like this...
SPECIAL(yourspecial)
{
if (CMD_IS("insert)) {
/* your code here */
return 1; /* proc has handled the command, no need to interpret it */
}
return 0; /* command didnt match, so send it to the interpreter */
}
This archive was generated by hypermail 2b30 : 12/18/00 PST