X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fcommand%2Fgeneric.qc;h=b7954e338f79ae9952581f3e061ff8520055b423;hb=e1326a2cccc2d471cd11161ab7eda42dfe4d5d2f;hp=2e00ff03a105af7a8a91b38b46d811d54f078ad0;hpb=74cb317eb10d44a2f21bd16c352092da742f880f;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/command/generic.qc b/qcsrc/common/command/generic.qc index 2e00ff03a..b7954e338 100644 --- a/qcsrc/common/command/generic.qc +++ b/qcsrc/common/command/generic.qc @@ -84,7 +84,7 @@ void GenericCommand_addtolist(float request, float argc) print("Incorrect parameters for ^2addtolist^7\n"); case CMD_REQUEST_USAGE: { - print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " addtolist variable value")); + print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " addtolist variable value\n")); print(" Where 'variable' is what to add 'value' to.\n"); print("See also: ^2removefromlist^7\n"); return; @@ -341,7 +341,7 @@ void GenericCommand_maplist(float request, float argc) print("Incorrect parameters for ^2maplist^7\n"); case CMD_REQUEST_USAGE: { - print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " maplist action [map]")); + print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " maplist action [map]\n")); print(" Where 'action' is the command to complete,\n"); print(" and 'map' is what it acts upon (if required).\n"); print(" Full list of commands here: \"add, cleanup, remove, shuffle.\"\n"); @@ -363,7 +363,7 @@ void GenericCommand_nextframe(float request, float arguments, string command) default: case CMD_REQUEST_USAGE: { - print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " nextframe command...")); + print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " nextframe command...\n")); print(" Where command will be executed next frame of this VM\n"); return; } @@ -401,7 +401,7 @@ void GenericCommand_removefromlist(float request, float argc) print("Incorrect parameters for ^2removefromlist^7\n"); case CMD_REQUEST_USAGE: { - print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " removefromlist variable value")); + print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " removefromlist variable value\n")); print(" Where 'variable' is what cvar to remove 'value' from.\n"); print("See also: ^2addtolist^7\n"); return; @@ -417,15 +417,17 @@ void GenericCommand_settemp(float request, float argc) { if(argc >= 3) { - if(cvar_settemp(argv(1), argv(2))) + float f = cvar_settemp(argv(1), argv(2)); + if(f == 1) dprint("Creating new settemp tracker for ", argv(1), " and setting it to \"", argv(2), "\" temporarily.\n"); - else + else if(f == -1) dprint("Already had a tracker for ", argv(1), ", updating it to \"", argv(2), "\".\n"); - + // else cvar_settemp itself errors out + return; } } - + default: print("Incorrect parameters for ^2settemp^7\n"); case CMD_REQUEST_USAGE: