MCPcopy Create free account
hub / github.com/T-Troll/alienfx-tools / CheckCommand

Function CheckCommand

alienfx-cli/alienfx-cli.cpp:51–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51int CheckCommand(string name, int args) {
52 // find command id, return -1 if wrong.
53 for (int i = 0; i < ARRAYSIZE(commands); i++) {
54 if (name == commands[i].name) {
55 if (commands[i].minArgs > args) {
56 printf("%s: Incorrect arguments count (at least %d needed)\n", commands[i].name, commands[i].minArgs);
57 return -1;
58 }
59 else
60 return commands[i].id;
61 }
62 }
63 return -2;
64}
65
66void Update() {
67 if (have_high)

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected