AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   : is seen as a new argument for commands (https://forums.alliedmods.net/showthread.php?t=75924)

DJ Tsunami 08-15-2008 08:48

: is seen as a new argument for commands
 
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?

teame06 08-15-2008 09:19

Re: : is seen as a new argument for commands
 
Yes, especially with GetCmdArg

DJ Tsunami 08-15-2008 09:30

Re: : is seen as a new argument for commands
 
Well... that's an easy answer :) Guess I'll have to live with it then, and fix it in my code.

bl4nk 08-15-2008 14:50

Re: : is seen as a new argument for commands
 
Or you can put quotes around the SteamID.

Greyscale 08-15-2008 15:50

Re: : is seen as a new argument for commands
 
Quote:

Originally Posted by DJ Tsunami
I know I can work around this by using quotes, but is that the correct behaviour?"


bl4nk 08-15-2008 17:36

Re: : is seen as a new argument for commands
 
Or you can use GetCmdArgString with BreakString. :D

BAILOPAN 08-15-2008 23:39

Re: : is seen as a new argument for commands
 
This is an artifact of Valve's command processing code which is from Quake 1.


All times are GMT -4. The time now is 20:02.

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