Ulysses
General => Developers Corner => Topic started by: ahref on April 12, 2009, 02:26:05 PM
-
Im used to seeing ulx concms being used like this:
function ulx.cc_blah(ply, command, argv, args)
...
end
ulx.concommand( "blah", ulx.cc_blah, "blah", ULib.ACCESS_ADMIN, "!blah", _, ulx.ID_PLAYER_HELP )
I know how to extract different arguments from the line using argv. I however want the full line minus the !blah eg.
"player: !blah i went to the park"
i want to use in my code the "i went to the park" portion of the line. I presumed this was in the args variable but have had little luck getting it to do anything. Im sure im doing it wrong. So either im on the wrong track or im doing it wrong.
So could I have an example of how to do this please?
-
Must be doing it wrong?
Your example when using ulx.concommand, <args> would absolutely be "i went to the park"
If you are not using ulx.concommand, but your own or Garry's hooks, yes, there will be differences.
-
args should be what you want. What value are you getting?
-
whoops. Yet again i was using weird logic. I did a check for if the number of arguments was over 1 to then start parsing the full line only i used the wrong symbol. "<". Thanks for putting up with me and my sloppy coding :D