Jump to content

WoW:Console: Difference between revisions

From Thunderbrew
No edit summary
No edit summary
Line 3: Line 3:
== Commands ==
== Commands ==


A Command is a whitespace-less string that can be associated with a function. The Command may or may not have a help message, and it may have a [[#Category]].
A Command is a whitespace-less string that can be associated with a function. The Command may or may not have a help message, and it may have a [[#Category|Category]] that controls its placement when displayed by the [[help (Console command)|help command]].


A Command is a function associated with a string that contains no whitespace. The function accepts the name of the command as a string, as well as an optional argument string. For example, running the following command:
A Command is a function associated with a string that contains no whitespace. The function accepts the name of the command as a string, as well as an optional argument string. For example, running the following command:

Revision as of 21:01, 12 June 2025

The console is fundamental to the entire engine. It determines how the Graphics API is initialized, controls how configurations are set, and allows many features to be toggled or adjusted using Commands without having to quit the game.

Commands

A Command is a whitespace-less string that can be associated with a function. The Command may or may not have a help message, and it may have a Category that controls its placement when displayed by the help command.

A Command is a function associated with a string that contains no whitespace. The function accepts the name of the command as a string, as well as an optional argument string. For example, running the following command:

RUN commandname "with argument"

will dispatch a handler function:

int32 handler(const char* command, const char* argument) {
  print(command);  // "commandname"
  print(argument); // "with argument"
  return 1; // boolean, 1 means the command succeeded
}

Category

Every Command or WoW:CVar belongs to a category number.

Usage

To use the console, the client must be specially launched using the -console command-line argument.