Nexuiz Ninjaz - Practicing the Ninja Art of Nexuiz

Full Version: [FAQ] Variables (vars)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Variables are used a bit like aliases, except this allows fast and easy access, it stores a variable in side the name you've assigned it. You're meant to use variables when there is a "variable".

To create a new variable (var) you need to type

Code:
set d "Defend The Flag!"

Now you can type:

Code:
$d

Then it's output would be:

Code:
unknown command "Defend The Flag!"

The reason it says this is because we haven't stated what it's meant to do.

Code:
set d "say Defend The Flag!"


That is how you make a simple var. If you want to use it in a alias or a bind all you need to type is $<var name>.
Just like in php spaces shouldn't be used for vars. If you're using two words they should be separated by a capital letter a '-' or a '_'.

$*, this just says what ever variable is entered it goes to here. For example

Code:
alias test "echo ^1>^2>^3> $* ^3<^2<^1<"

Remember that the command echo can be changed to, say, say_team, bind any command that is set by the user.

Then you enter in the console:

Code:
test This Example Was Given by, ^1[^9GT^1]^1S^2H^3A^5G^6G^7Y ^1{^7X^1}

Reference URL's