Index: cpp/frams/param/param.cpp
===================================================================
--- cpp/frams/param/param.cpp	(revision 946)
+++ cpp/frams/param/param.cpp	(revision 950)
@@ -331,4 +331,25 @@
 }
 
+SString ParamInterface::nameDotProperty(int prop)
+{
+	SString ret = getName();
+	ret+=".";
+	ret+=id(prop);
+	return ret;
+}
+
+SString ParamInterface::nameDotPropertyForMessages(int prop)
+{
+	SString name_dot_prop = nameDotProperty(prop);
+	if (strcmp(getName(),getLongName())==0)
+		{
+		if (strcmp(id(prop),name(prop))==0)
+			return name_dot_prop;
+		else
+			return SString("'")+name(prop)+"': "+name_dot_prop;
+		}
+	else
+		return SString("'")+name(prop)+"' in '"+getLongName()+"': "+name_dot_prop;
+}
 
 int SimpleAbstractParam::isequal(int i, void* defdata)
@@ -421,5 +442,5 @@
 	SString field;
 	if (field_index >= 0)
-		field = SString::sprintf("'%s.%s'", pi->getName(), pi->id(field_index));
+		field = pi->nameDotPropertyForMessages(field_index);
 	else
 		field = SString::sprintf("unknown property of '%s'", pi->getName());
@@ -445,6 +466,6 @@
 		bool show_length = valuetoset.getType() == TString;
 		const char* quote = (valuetoset.getType() == TString) ? "\"" : "'";
-		logPrintf("Param", "set", LOG_WARN, "Setting %s.%s = %s exceeded allowed range (too %s). %s to %s.",
-			getName(), id(i),
+		logPrintf("Param", "set", LOG_WARN, "Setting %s = %s exceeded allowed range (too %s). %s to %s.",
+			nameDotPropertyForMessages(i).c_str(),
 			::sstringDelimitAndShorten(svaluetoset, 30, show_length, quote, quote).c_str(),
 			(setflags&PSET_HITMAX) ? (s_type ? "long" : "big") : "small", s_type ? "Truncated" : "Adjusted",
@@ -674,5 +695,5 @@
 	case 'o':	ret.setObject(getObject(i)); break;
 	case 'x':	ret = getExtValue(i); break;
-	default: logPrintf("ParamInterface", "get", LOG_ERROR, "'%s.%s' is not a property", getName(), id(i));
+	default: logPrintf("ParamInterface", "get", LOG_ERROR, "%s is not a property", nameDotPropertyForMessages(i).c_str());
 	}
 }
@@ -718,5 +739,5 @@
 			if (v.type == TObj)
 			{
-				logPrintf("ParamInterface", "set", LOG_ERROR, "Setting int '%s.%s' from object reference (%s)", getName(), id(i), v.getString().c_str());
+				logPrintf("ParamInterface", "set", LOG_ERROR, "Setting int %s from object reference (%s)", nameDotPropertyForMessages(i).c_str(), v.getString().c_str());
 				return 0;
 			}
@@ -730,5 +751,5 @@
 			if (v.type == TObj)
 			{
-				logPrintf("ParamInterface", "set", LOG_ERROR, "Setting float '%s.%s' from object reference (%s)", getName(), id(i), v.getString().c_str());
+				logPrintf("ParamInterface", "set", LOG_ERROR, "Setting float %s from object reference (%s)", nameDotPropertyForMessages(i).c_str(), v.getString().c_str());
 				return 0;
 			}
@@ -739,10 +760,10 @@
 	case 'o':
 		if ((v.type != TUnknown) && (v.type != TObj))
-			logPrintf("ParamInterface", "set", LOG_ERROR, "Setting object '%s.%s' from %s", getName(), id(i), v.typeAndValue().c_str());
+			logPrintf("ParamInterface", "set", LOG_ERROR, "Setting object %s from %s", nameDotPropertyForMessages(i).c_str(), v.typeAndValue().c_str());
 		else
 			return setObject(i, v.getObject());
 		break;
 	case 'x': return setExtValue(i, v);
-	default: logPrintf("ParamInterface", "set", LOG_ERROR, "'%s.%s' is not a property", getName(), id(i));
+	default: logPrintf("ParamInterface", "set", LOG_ERROR, "%s is not a property", nameDotPropertyForMessages(i).c_str());
 	}
 	return 0;
@@ -922,5 +943,5 @@
 	if (err != NULL)
 		logPrintf("SimpleAbstractParam", "sanityCheck", LOG_ERROR,
-			"Invalid ParamEntry for %s.%s (%s)", getName(), pe->id, err);
+			  "Invalid ParamEntry for %s (%s)", nameDotPropertyForMessages(i).c_str(), err);
 }
 #endif
@@ -1156,5 +1177,5 @@
 		else
 			logPrintf("SimpleAbstractParam", "setObject", LOG_ERROR,
-				"'%s.%s' is PARAM_OBJECTSET but no 'assign()' in %s", getName(), pe->id, o.interfaceName());
+				"%s is PARAM_OBJECTSET but no 'assign()' in %s", nameDotPropertyForMessages(i).c_str(), o.interfaceName());
 		return PSET_CHANGED;
 	}
@@ -1205,5 +1226,5 @@
 	{
 		logPrintf("SimpleAbstractParam", "call", LOG_ERROR,
-			(*pe->type != 'p') ? "'%s.%s' is not a function" : "Internal error - undefined function pointer for '%s.%s'", getName(), pe->id);
+			(*pe->type != 'p') ? "%s is not a function" : "Internal error - undefined function pointer for %s", nameDotPropertyForMessages(i).c_str());
 		ret->setInvalid();
 	}
Index: cpp/frams/param/param.h
===================================================================
--- cpp/frams/param/param.h	(revision 946)
+++ cpp/frams/param/param.h	(revision 950)
@@ -72,4 +72,5 @@
 
 	virtual const char* getName() = 0;
+	virtual const char* getLongName() { return getName(); }
 	virtual const char* getDescription() { return 0; }
 	virtual ParamEntry *getParamTab() const { return NULL; }
@@ -193,4 +194,6 @@
 	virtual void sanityCheck(int i) {}
 #endif
+	SString nameDotProperty(int prop);
+	SString nameDotPropertyForMessages(int prop);
 };
 
@@ -257,4 +260,5 @@
 	virtual void *getTarget(int i);
 	const char* myname;
+	const char* mylongname;
 	bool dontcheckchanges;
 
@@ -263,5 +267,8 @@
 
 	const char* getName() { return myname; }
+	const char* getLongName() { return mylongname ? mylongname : myname; }
+
 	void setName(const char* n) { myname = n; }
+	void setLongName(const char* n) { mylongname = n; }
 
 	/**
@@ -270,5 +277,5 @@
 		@param n Param's name
 		*/
-	SimpleAbstractParam(void* o = 0, const char*n = 0) :myname(n), dontcheckchanges(0), object(o) {}
+	SimpleAbstractParam(void* o = 0, const char*n = 0) :myname(n), mylongname(NULL), dontcheckchanges(0), object(o) {}
 	void setDontCheckChanges(bool x) { dontcheckchanges = x; }
 
@@ -330,4 +337,5 @@
 
 	const char* getDescription() { return tab[0].type; }
+	const char* getLongName() { return tab[0].help ? tab[0].help : SimpleAbstractParam::getLongName(); }
 
 	int getGroupCount() { return tab[0].group; }
Index: cpp/frams/vm/framscript.l
===================================================================
--- cpp/frams/vm/framscript.l	(revision 946)
+++ cpp/frams/vm/framscript.l	(revision 950)
@@ -35,5 +35,5 @@
 "'''"              {trctx.tmp=""; trctx.multilimit='\''; BEGIN multiline;}
 "@line "[0-9]+\n   {trctx.line=atol(yytext+6);trctx.linechanged=true;}
-"@file "[^\n\t\r]+\n {trctx.srcname=SString(yytext+6,yyleng-7);trctx.namechanged=true;}
+"@file "[^\n\t\r]+\n {trctx.setSrcname(SString(yytext+6,yyleng-7),true);trctx.namechanged=true;}
 
 [a-zA-Z_][a-zA-Z0-9_]* { int t=lookupToken(yytext);
