----- Original Message ----- From: "Kras Kresh" <kras_kresh@HOTMAIL.COM> > >From: Alex <fletchra@qsilver.queensu.ca> > > > > > if (!cmd && !number(0, 5)) { > > > do_action(recep, NULL, find_command(action_table[number(0, 8)]), 0); > > > return (FALSE); > >this just makes the receptionist do an action (from the list above it). > > > >'do_action' is the way that actions are called. > > > > > Also.. should I keep action_table as const or change to static? > >it shouldn't make a difference really. > > > > I know that is the way actions are called. What I'm saying is that its > do_action(ch, arg, cmd, subcmd). > What the call for receptionist does is nothing since there is no arg. > Is that not true? > No. When command_interpreter() calls a command it calls it like this: you type: smile welcor command_interpreter splits this: cmd="smile" arg=" welcor" and then calls do_action(ch, " welcor", find_command("smile"), 0); (shortened a bit, but that's what it does). do_action handles the actual processing of the argument, which, if it's NULL, simply means there's second party to the social. (Ie. the social with no target gets shown). Welcor -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | | Newbie List: http://groups.yahoo.com/group/circle-newbies/ | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 06/25/03 PDT