Raised This Month: $32 Target: $400
 8% 

: is seen as a new argument for commands


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 08-15-2008 , 08:48   : is seen as a new argument for commands
Reply With Quote #1

I'm not sure if this is a bug or a feature. Using the exact code from Adding Commands, this is what it returns:
Code:
14:42:37 test_command STEAM_0:0:123456
14:42:37 Command from server.
         Argument string: STEAM_0:0:123456
         Argument count: 5
         Argument 1: STEAM_0
         Argument 2: :
         Argument 3: 0
         Argument 4: :
         Argument 5: 123456
I know I can work around this by using quotes, but is that the correct behaviour?
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 08-15-2008 , 09:19   Re: : is seen as a new argument for commands
Reply With Quote #2

Yes, especially with GetCmdArg
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 08-15-2008 , 09:30   Re: : is seen as a new argument for commands
Reply With Quote #3

Well... that's an easy answer Guess I'll have to live with it then, and fix it in my code.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 08-15-2008 , 14:50   Re: : is seen as a new argument for commands
Reply With Quote #4

Or you can put quotes around the SteamID.
bl4nk is offline
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 08-15-2008 , 15:50   Re: : is seen as a new argument for commands
Reply With Quote #5

Quote:
Originally Posted by DJ Tsunami
I know I can work around this by using quotes, but is that the correct behaviour?"
__________________
Greyscale is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 08-15-2008 , 17:36   Re: : is seen as a new argument for commands
Reply With Quote #6

Or you can use GetCmdArgString with BreakString.
bl4nk is offline
BAILOPAN
Join Date: Jan 2004
Old 08-15-2008 , 23:39   Re: : is seen as a new argument for commands
Reply With Quote #7

This is an artifact of Valve's command processing code which is from Quake 1.
__________________
egg
BAILOPAN is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:01.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode