diff --git a/config/docs.cfg b/config/docs.cfg index a669539d..1f9d4093 100644 --- a/config/docs.cfg +++ b/config/docs.cfg @@ -196,6 +196,15 @@ docargument [N] [akimbo end action] [min 0/max 2/default 0]; docexample [akimboendaction 0] [none]; docexample [akimboendaction 1] [switch to primary]; docexample [akimboendaction 2] [switch to grenades, else switch to primary]; +docident [break] [Aborts a loop created with a 'loop' or 'while' command.]; +docexample [loop i 10 [ echo $i; if (= $i 4) break ]] [Output: 0 1 2 3 4]; +docexample [loop i 10 [ if (= $i 4) break; echo $i ]] [Note how the result is no different than in the example before.]; +docexample [loop i 10 [ if (= $i 4) [break] [echo $i] ]] [Output: 0 1 2 3]; +docremark [Note: As opposed to (almost) any other scripting language, this command does NOT abort execution of the current iteration. Instead, it aborts the loop after the execution of that iteration has finished. If you want to break out of a loop without executing the rest of the code, use an if-else construction as in the last example.]; +docident [checkalias] [Determines if the argument given is an existing alias or not.]; +docargument [A] [the alias to check for] [] [0]; +docexample [hello = ""; echo (checkalias hello)] [Output: 1]; +docexample [echo (checkalias oMgThIsAlIaSpRoLlYdOeSnTeXiSt)] [Output: 0]; docsection [General] docident [addserver] [Adds a server to the list of server to query in the server list menu.]; docargument [S] [the address of the server (hostname or IP)] [] [0]; @@ -652,6 +661,10 @@ docident [inWater] [Determines if the local player is standing in water or subme docargument [T] [check if submerged instead?] [min 0/max 1/default 0] [0]; docexample [if (inWater) [echo in water] [echo not in water]] [Example output: in water]; docexample [if (inWater 1) [echo submerged] [echo not submerged]] [Example output: not submerged]; +docident [setbottimeout] [set the length of matches against bots]; +docargument [M] [mode] [1 or 2] [0]; +docargument [T] [time (in minutes)] [1-60] [0]; +docremark [The first argument "M" needs to be 1 for setting the FFA-timeout or 2 for the Team-Mode-timeout.]; docsection [Editing] docident [addpath1way1] []; docident [addpath1way2] []; diff --git a/docs/reference.xml b/docs/reference.xml index cdada56b..88e581b0 100644 --- a/docs/reference.xml +++ b/docs/reference.xml @@ -783,6 +783,23 @@ + + + Determines if the argument given is an existing alias or not. + + + + Output: 1 + + + + Output: 0 + + + + + + @@ -5553,7 +5570,7 @@ Output: set the length of matches against bots - The first argument M needs to be 1 for setting the DeathMatch-timeout or 2 for the TeamMode-timeout. + The first argument "M" needs to be 1 for setting the FFA-timeout or 2 for the Team-Mode-timeout. diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index 787877f9..21d56492 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -39,9 +39,9 @@ void setbottimeout(int m, int t) default: break; } } - else conoutf("time is not >=1 or <=60"); + else conoutf(_("\f3Error: \f5valid range for time is 1-60")); } - else conoutf("mode needs to be 1 for DeathMatch or 2 for TeamMode"); + else conoutf(_("\f3Error: \f5mode needs to be 1 for FFA or 2 for team modes")); } COMMAND(setbottimeout, ARG_2INT); @@ -150,7 +150,7 @@ void listignored() pl[0] = '\0'; loopv(players) if(players[i] && players[i]->ignored) concatformatstring(pl, ", %s", colorname(players[i])); if(*pl) conoutf(_("ignored players: %s"), pl + 2); - else conoutf(_("no players ignored.")); + else conoutf(_("no players were ignored.")); } void clearignored(char *ccn) @@ -171,7 +171,7 @@ void listmuted() pl[0] = '\0'; loopv(players) if(players[i] && players[i]->muted) concatformatstring(pl, ", %s", colorname(players[i])); if(*pl) conoutf(_("muted players: %s"), pl + 2); - else conoutf(_("no players muted.")); + else conoutf(_("no players were muted.")); } void clearmuted(char *ccn)