Prevent "!set type none blah"

This commit is contained in:
jacksonmj 2013-04-18 21:07:21 +01:00
parent b9f150f0d2
commit ada7c7bb11

View File

@ -334,6 +334,8 @@ AnyType TPTScriptInterface::tptS_set(std::deque<std::string> * words)
if(type<0 || type>=PT_NUM)
throw GeneralException("Invalid particle type");
if(type==0)
throw GeneralException("Cannot set properties of particles that do not exist");
std::cout << propertyOffset << std::endl;
switch(propertyFormat)
{