Author Topic: Server Command Values?  (Read 410 times)

As in, if someone says "/test 9 6"
How would 9 and 6 be distinguished as variables?

I think i've seen it before, taking the players text into count like %parameter1 or something. I've wondered this for a long time.

Code: [Select]
function servercmdtest(%client, %a, %b)
{
   //Do stuff here
}


%a would be 9
%b would be 6

EDIT;
fixed
Treynolds teaches me something new every day. Lol.
« Last Edit: September 24, 2012, 05:03:34 PM by ¥ola »

Except the first character after the variable identifier cannot be a number
%a and %b work just fine

Keep getting beaten to the reply D:

Also, unlock your previous thread. I'm not sure if that's the best solution.
Never mind you did

Except the first character after the variable identifier cannot be a number
%a and %b work just fine
%1, %2...

Work just fine do they idk

woops dumbness
« Last Edit: September 24, 2012, 05:11:34 PM by Blocki »

%1, %2...

Work just fine do they idk
I really hate it when people post in coding help when they have literally no clue what they're talking about

variable names MUST start with a letter. NO EXCEPTIONS.

The arguments in a servercmd are distinguished by the space character, which seperates the arguments.
Each word is interpreted as 1 argument.

I really hate it when people post in coding help when they have literally no clue what they're talking about

variable names MUST start with a letter. NO EXCEPTIONS.

The arguments in a servercmd are distinguished by the space character, which seperates the arguments.
Each word is interpreted as 1 argument.
in chat, by default

both of those can be changed