Mercurial > hg > openttd
changeset 636:42dce61bb1db draft
(svn r1067) -Add: [Console] Added comment for scripts (everything behind the # is
ignored) (GeniusDex / sign_de)
author | truelight <truelight@openttd.org> |
---|---|
date | Mon, 13 Dec 2004 19:07:54 +0000 |
parents | ad4715eaa6ec |
children | 9a1047eb0896 |
files | console_cmds.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/console_cmds.c +++ b/console_cmds.c @@ -286,8 +286,9 @@ fgets(cmd, sizeof(cmd), _script_file); while (!feof(_script_file) && _script_running) { - strtok(cmd, "\r\n"); - IConsoleCmdExec(cmd); + strtok(cmd, "\r\n#"); + if (strlen(cmd) > 0 && cmd[0] != '#') + IConsoleCmdExec(cmd); fgets(cmd, sizeof(cmd), _script_file); }