> I want to make a command that accepts four different arguments, > but since I have been unable to find another command that does > this, I'm left in the dark... > > <command> <arg1> <arg2> <arg3> <arg4> I personally use half_chop() (or used half_chop() before we migrated to a String class), but there are several functions in interpreter.c that you might look at (half_chop(), one_argument(), two_arguments(), etc). Basically, half_chop(frog, bing, bong) takes the first word of "frog" and stores it in "bing," and stores the remainder of "frog" in "bong," so you can use half_chop() to your heart's content to break down the whole argument. Of course, always check to make sure "bing" and "bong" are not NULL pointers after every call. HTH, --- Jon A. Nielsen - lazarus@kilnar.com / nielsenje@home.com Lazarus of Spear of Insanity MUD telnet://spear.kilnar.com:1066 -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/03/01 PST