summaryrefslogtreecommitdiff
path: root/plugins/changeitem.cpp
diff options
context:
space:
mode:
authorRobert Heinrich2012-03-29 18:26:10 +0200
committerRobert Heinrich2012-03-29 18:26:10 +0200
commita4995d76819f96aed54cbca48ca70185042636b6 (patch)
tree52e5304b8edcf483a6666cb423606d331f5532b8 /plugins/changeitem.cpp
parent836d8de73e84dc8cf69307218478d8639e26f469 (diff)
downloaddfhack-a4995d76819f96aed54cbca48ca70185042636b6.tar.gz
dfhack-a4995d76819f96aed54cbca48ca70185042636b6.tar.bz2
dfhack-a4995d76819f96aed54cbca48ca70185042636b6.tar.xz
minor: return CR_WRONG_USAGE if user forgot to specify material and/or quality
Diffstat (limited to 'plugins/changeitem.cpp')
-rw-r--r--plugins/changeitem.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/changeitem.cpp b/plugins/changeitem.cpp
index b7dd17a0..6fbf1af2 100644
--- a/plugins/changeitem.cpp
+++ b/plugins/changeitem.cpp
@@ -146,6 +146,7 @@ command_result df_changeitem(color_ostream &out, vector <string> & parameters)
if(i == parameters.size()-1)
{
out.printerr("no material specified!\n");
+ return CR_WRONG_USAGE;
}
change_material = true;
new_material = parameters[i+1];
@@ -157,6 +158,7 @@ command_result df_changeitem(color_ostream &out, vector <string> & parameters)
if(i == parameters.size()-1)
{
out.printerr("no quality specified!\n");
+ return CR_WRONG_USAGE;
}
string & q = parameters[i+1];
// meh. should use a stringstream instead. but it's only 6 numbers