doc updates/more intuitive error msgs for setbottimeout

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6405 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Bukz
2011-05-03 23:23:09 +00:00
parent ee810efffc
commit 365d161187
3 changed files with 35 additions and 5 deletions
+13
View File
@@ -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] [];
+18 -1
View File
@@ -783,6 +783,23 @@
<identifierReference identifier="getvar"/>
</references>
</command>
<command name="checkalias">
<description>Determines if the argument given is an existing alias or not.</description>
<examples>
<example>
<code><![CDATA[hello = ""; echo (checkalias hello)]]></code>
<explanation>Output: 1</explanation>
</example>
<example>
<code><![CDATA[echo (checkalias oMgThIsAlIaSpRoLlYdOeSnTeXiSt)]]></code>
<explanation>Output: 0</explanation>
</example>
</examples>
<arguments>
<argument token="A" description="the alias to check for"/>
</arguments>
</command>
</identifiers>
</section>
@@ -5553,7 +5570,7 @@ Output:
<command name="setbottimeout">
<description>set the length of matches against bots</description>
<remarks>
<remark>The first argument <b>M</b> needs to be <b>1</b> for setting the DeathMatch-timeout or <b>2</b> for the TeamMode-timeout.</remark>
<remark>The first argument <b>"M"</b> needs to be <b>1</b> for setting the FFA-timeout or <b>2</b> for the Team-Mode-timeout.</remark>
</remarks>
<arguments>
<argument token="M" description="mode" valueNotes="1||2"/>
+4 -4
View File
@@ -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)