Command with multiple arguments
Posted: Sat Jan 08, 2011 1:24 pm
I'm looking for a way to allow for a command that accepts multiple arguments.
I've found in the code that handles the "give" command (in g_cmds.c) that they do this:
char *name
name = ConcatArgs( 1 );
to get the argument supplied with the give command, but there seems to be no way of accepting multiple arguments.
I thought of making the command so that arguments are comma seperated or space seperated or something and then to split that string or use some sort of substring subroutine, but ofcourse there seems to be no such functionality in the Q3 codebase and ofcourse string.h can't be used
Anyone know how to do this?
I've found in the code that handles the "give" command (in g_cmds.c) that they do this:
char *name
name = ConcatArgs( 1 );
to get the argument supplied with the give command, but there seems to be no way of accepting multiple arguments.
I thought of making the command so that arguments are comma seperated or space seperated or something and then to split that string or use some sort of substring subroutine, but ofcourse there seems to be no such functionality in the Q3 codebase and ofcourse string.h can't be used

Anyone know how to do this?