Skip to content

Commit

Permalink
Console: Improved output after invalid use of command arguments
Browse files Browse the repository at this point in the history
The message can be more specific as to what was the problem.
  • Loading branch information
skyjake committed Nov 15, 2013
1 parent 03ce79a commit 614a8c6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion doomsday/client/src/con_main.cpp
Expand Up @@ -1082,7 +1082,15 @@ static int executeSubCmd(const char *subCmd, byte src, boolean isNetCmd)
}

// What *is* that?
Con_Printf("%s: unknown identifier, or command arguments invalid.\n", args.argv[0]);
if(Con_FindCommand(args.argv[0]))
{
LOG_WARNING("%s: command arguments invalid") << args.argv[0];
Con_Executef(CMDS_DDAY, false, "help %s", args.argv[0]);
}
else
{
LOG_MSG("%s: unknown identifier") << args.argv[0];
}
return false;
}

Expand Down

0 comments on commit 614a8c6

Please sign in to comment.