AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   arguments, characters. (https://forums.alliedmods.net/showthread.php?t=49915)

NewUser 01-15-2007 16:41

arguments, characters.
 
How do I check if an argument has less than or greater than three characters? Or even just to check to see if an argument has three characters. Either is fine.

teame06 01-15-2007 16:44

Re: arguments, characters.
 
Code:
new len = strlen(string); if(len < 3)     server_print("Less than 3 characters"); else     server_print("More than 3 characters");

MaximusBrood 01-15-2007 18:01

Re: arguments, characters.
 
And this, is wrong.
For obvious reasons.

Code:
new len = strlen(string); if(len < 3)     server_print("Less than 3 characters"); else     server_print("More than or equal to 3 characters");


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

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