Print a clearer error message if a function name is encountered without parentheses.

This commit is contained in:
Christoph Oelckers 2016-11-05 01:24:52 +01:00
parent 010fd038be
commit 514bcfb128

View file

@ -5075,7 +5075,14 @@ FxExpression *FxIdentifier::Resolve(FCompileContext& ctx)
}
else
{
ScriptPosition.Message(MSG_ERROR, "Invalid member identifier '%s'\n", Identifier.GetChars());
if (sym->IsKindOf(RUNTIME_CLASS(PFunction)))
{
ScriptPosition.Message(MSG_ERROR, "Function '%s' used without ().\n", Identifier.GetChars());
}
else
{
ScriptPosition.Message(MSG_ERROR, "Invalid member identifier '%s'.\n", Identifier.GetChars());
}
delete this;
return nullptr;
}