Ulysses

General => Developers Corner => Topic started by: ahref on April 12, 2009, 02:26:05 PM

Title: Getting full line from a ulx concmd.
Post by: ahref on April 12, 2009, 02:26:05 PM
Im used to seeing ulx concms being used like this:
Code: [Select]
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?
Title: Re: Getting full line from a ulx concmd.
Post by: JamminR on April 12, 2009, 05:58:43 PM
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.
Title: Re: Getting full line from a ulx concmd.
Post by: Megiddo on April 12, 2009, 06:20:05 PM
args should be what you want. What value are you getting?
Title: Re: Getting full line from a ulx concmd.
Post by: ahref on April 13, 2009, 03:23:35 AM
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