]> git.mxchange.org Git - quix0rs-blobwars.git/commitdiff
Show help when encountering an unknown argument on the command line.
authorGuus Sliepen <guus@debian.org>
Thu, 6 Aug 2015 15:16:12 +0000 (17:16 +0200)
committerGuus Sliepen <guus@debian.org>
Thu, 6 Aug 2015 15:16:12 +0000 (17:16 +0200)
src/main.cpp

index c5e9ba84954eafd151d7a51a5ee294aa0cceb79f..951725af133c0deea9cef340cdff6f1f3f606ac6 100644 (file)
@@ -146,6 +146,8 @@ int main(int argc, char *argv[])
                else if (strcmp(argv[i], "-randomscreens") == 0) graphics.takeRandomScreenShots = true;
                else if (strcmp(argv[i], "-nomonsters") == 0) engine.devNoMonsters = true;
                #endif
+
+               else {fprintf(stderr, "Unknown argument '%s'\n", argv[i]); showHelp();}
        }
        
        switch (recordMode)