XSeth2kX Posted December 14, 2002 Posted December 14, 2002 how would i get the second word typed into the console im tryign to make a msg command ie "MSG TEST" how would i set it to trigger the command msg and the actuall msg to be test then print it?
Wudan Posted December 16, 2002 Posted December 16, 2002 you mean how do you get stuff entered in the console to have command arguments and stuff - I think jaii nailed your question. If he didn't, well, it's your fault for not being specific.
XSeth2kX Posted December 16, 2002 Author Posted December 16, 2002 Originally posted by Jaii der Herr *_Argv() functions? ? I want to get the 2nd word typed in the console.say the user typed in MSG TEST i want it to trigger the function MSG and actually message "test"
Jaii der Herr Posted December 16, 2002 Posted December 16, 2002 and with the *_argv() functions you can get the seperate words. *_Argv(1); would be the second word.
Code Posted December 16, 2002 Posted December 16, 2002 if (trap_Argc() == 2) { char wanted[MAX_STRING_CHARS]; trap_Argv( 1, wanted, sizeof( wanted ) ); // do something with wanted here }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.