Index: /cpp/frams/model/model.cpp
===================================================================
--- /cpp/frams/model/model.cpp	(revision 392)
+++ /cpp/frams/model/model.cpp	(revision 393)
@@ -570,5 +570,5 @@
 	partparam.select(p);
 	pos+=2;
-	partparam.load2(line,pos);
+	if (partparam.load2(line,pos) & ParamInterface::LOAD2_PARSE_FAILED) return -1;
 	p->o.rotate(p->rot);
 	parts+=p;
@@ -582,5 +582,5 @@
 	modelparam.select(this);
 	pos+=2;
-	modelparam.load2(line,pos);
+	if (modelparam.load2(line,pos) & ParamInterface::LOAD2_PARSE_FAILED) return -1;
 	return 0;
 	}
@@ -592,5 +592,5 @@
 	pos+=2;
 	j->owner=this;
-	jointparam.load2(line,pos);
+	if (jointparam.load2(line,pos) & ParamInterface::LOAD2_PARSE_FAILED) return -1;
 	if ((j->p1_refno>=0)&&(j->p1_refno<getPartCount())&&
 	   (j->p2_refno>=0)&&(j->p2_refno<getPartCount()))
@@ -620,5 +620,5 @@
 	neuroparam.select(nu);
 	pos+=2;
-	neuroparam.load2(line,pos);
+	if (neuroparam.load2(line,pos) & ParamInterface::LOAD2_PARSE_FAILED) return -1;
 #ifdef MODEL_V1_COMPATIBLE
 	if (nu->neuro_refno>=0) // parent specified...
@@ -684,5 +684,5 @@
 	ncparam.select(&c);
 	pos+=2;
-	ncparam.load2(line,pos);
+	if (ncparam.load2(line,pos) & ParamInterface::LOAD2_PARSE_FAILED) return -1;
 	if ((c.n1_refno>=0)&&(c.n1_refno<getNeuroCount())&&(c.n2_refno>=0)&&(c.n2_refno<getNeuroCount()))
 		{
@@ -706,5 +706,5 @@
 	neuroitemparam.select(nu);
 	pos+=3;
-	neuroitemparam.load2(line,pos);
+	if (neuroitemparam.load2(line,pos) & ParamInterface::LOAD2_PARSE_FAILED) return -1;
 	// illegal parent?
 	if ((nu->neuro_refno<0)||(nu->neuro_refno>=old_getNeuroCount()))
Index: /cpp/frams/param/param.cpp
===================================================================
--- /cpp/frams/param/param.cpp	(revision 392)
+++ /cpp/frams/param/param.cpp	(revision 393)
@@ -529,7 +529,7 @@
 		paInt mn, mx, def;
 		if (getMinMax(i, mn, mx, def) >= 3)
-			return setInt(i, def);
+			return setInt(i, def) | PSET_PARSEFAILED;
 		else
-			return setInt(i, (paInt)0);
+			return setInt(i, (paInt)0) | PSET_PARSEFAILED;
 	}
 	else
@@ -544,7 +544,7 @@
 		double mn, mx, def;
 		if (getMinMax(i, mn, mx, def) >= 3)
-			return setDouble(i, def);
+			return setDouble(i, def) | PSET_PARSEFAILED;
 		else
-			return setDouble(i, (double)0);
+			return setDouble(i, (double)0) | PSET_PARSEFAILED;
 	}
 	else
@@ -1013,4 +1013,5 @@
 	const char *value, *valstop;
 	SString tmpvalue;
+	bool parse_failed=false;
 	if (poz >= s.len()) return fields_loaded;
 	t = s.c_str() + poz;
@@ -1038,5 +1039,6 @@
 			{
 				field_end = strchrlimit(quote2 + 1, ',', end);
-				if (!field_end) next_field = field_end = end;
+				if (!field_end) field_end = end;
+				next_field = field_end;
 			}
 			equals_sign = strchrlimit(t, '=', quote);
@@ -1094,4 +1096,6 @@
 				logPrintf("Param", "load2", LOG_WARN, "Adjusted '%s' in '%s' (was too %s)",
 				id(i), getName(), (ret&PSET_HITMAX) ? "big" : "small");
+			if (ret&PSET_PARSEFAILED)
+				parse_failed=true;
 			*(char*)valstop = remember;
 		}
@@ -1104,5 +1108,5 @@
 #endif
 	}
-	return fields_loaded;
+	return fields_loaded | (parse_failed ? LOAD2_PARSE_FAILED : 0);
 }
 
Index: /cpp/frams/param/param.h
===================================================================
--- /cpp/frams/param/param.h	(revision 392)
+++ /cpp/frams/param/param.h	(revision 393)
@@ -50,8 +50,11 @@
 #define PSET_HITMAX	8
 
+#define PSET_NOPROPERTY	16
+
+#define PSET_PARSEFAILED	32
+
 // useful combination: need to get and display the value so that a user knows that the value they tried to set has been rejected or changed
-#define PSET_WARN (PSET_RONLY | PSET_HITMIN | PSET_HITMAX)
-
-#define PSET_NOPROPERTY	16
+#define PSET_WARN (PSET_RONLY | PSET_HITMIN | PSET_HITMAX | PSET_PARSEFAILED)
+
 
 struct ParamEntry;
@@ -162,7 +165,9 @@
 	int saveprop(VirtFILE*, int i, const char* p, bool force = 0);
 	int load(VirtFILE*, bool warn_unknown_fields = true, bool *abortable = NULL, int *linenum = NULL);///< @return the number of fields loaded
-	int load2(const SString &, int &);///< @return the number of fields loaded
+	int load2(const SString &, int &);///< @return the number of fields loaded (or'ed with LOAD2_PARSE_FAILED if a parsing error was detected)
 
 	static const char* SERIALIZATION_PREFIX;
+	static const int LOAD2_PARSE_FAILED=(1<<30); ///< this bit is set in return value from load2 if a parse error was detected while loading. usage: if (load2(...) & LOAD2_PARSE_FAILED) ...
+	static const int LOAD2_IGNORE_PARSE_FAILED=(~LOAD2_PARSE_FAILED); ///< bitmask to be used if the parsing error is to be ignored. usage: int number_of_loaded_fields=load2(...) & LOAD2_IGNORE_PARSE_FAILED;
 
 #ifdef DEBUG
