XSeth2kX Posted December 14, 2002 Share 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? Link to comment Share on other sites More sharing options...
XSeth2kX Posted December 15, 2002 Author Share Posted December 15, 2002 ANYONE? Link to comment Share on other sites More sharing options...
XSeth2kX Posted December 16, 2002 Author Share Posted December 16, 2002 . Link to comment Share on other sites More sharing options...
Jaii der Herr Posted December 16, 2002 Share Posted December 16, 2002 *_Argv() functions? Link to comment Share on other sites More sharing options...
Wudan Posted December 16, 2002 Share 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. Link to comment Share on other sites More sharing options...
XSeth2kX Posted December 16, 2002 Author Share 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" Link to comment Share on other sites More sharing options...
Jaii der Herr Posted December 16, 2002 Share Posted December 16, 2002 and with the *_argv() functions you can get the seperate words. *_Argv(1); would be the second word. Link to comment Share on other sites More sharing options...
Code Posted December 16, 2002 Share Posted December 16, 2002 if (trap_Argc() == 2) { char wanted[MAX_STRING_CHARS]; trap_Argv( 1, wanted, sizeof( wanted ) ); // do something with wanted here } Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.