AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   help with Arg (https://forums.alliedmods.net/showthread.php?t=106040)

Xevious 10-11-2009 00:08

help with Arg
 
PHP Code:

if (Arg1[0] == ''

if i want arg1[0] first character is nothing, then what i want to do?

Arg1[0] == 'nothing' ?? :)

shadow.hk 10-11-2009 02:09

Re: help with Arg
 
if( !arg[0] )

Bugsy 10-11-2009 09:54

Re: help with Arg
 
Just a little FYI:
Every character in a string (ascii std) is represented by an integer value of 1-255. If the value in any location of the string is 0, that means null (empty or end of string).

Either of these is all you need to do:

if ( !arg[ 0 ] )

if ( arg[ 0 ] == 0 )


All times are GMT -4. The time now is 22:42.

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