diff --git a/src/tim/engine/compilers/html.nim b/src/tim/engine/compilers/html.nim
index c4b2e67..5157bda 100755
--- a/src/tim/engine/compilers/html.nim
+++ b/src/tim/engine/compilers/html.nim
@@ -1194,7 +1194,7 @@ proc unsafeCall(c: var HtmlCompiler, node, fnNode: Node,
add args, (param[0][1..^1], argValue)
else: return # typeCheck returns `typeMismatch`
do:
- compileErrorWithArgs(fnReturnVoid, ["?"])
+ compileErrorWithArgs(fnReturnVoid, [node.identArgs[i].identName])
except Defect:
compileErrorWithArgs(fnExtraArg,
[node.identName, $(params.len), $(node.identArgs.len)])
diff --git a/src/tim/engine/logging.nim b/src/tim/engine/logging.nim
index 85f604e..05ee882 100755
--- a/src/tim/engine/logging.nim
+++ b/src/tim/engine/logging.nim
@@ -23,6 +23,7 @@ type
fnRedefine = "Attempt to redefine function $ [RedefineFunction]"
fnUndeclared = "Undeclared function $ [UndeclaredFunction]"
fnReturnMissingCommand = "Expression $ is of type $ and has to be used or discarded [UseOrDiscard]"
+ fnReturnVoid = "Function $ has no return type [VoidFunction]"
fnExtraArg = "Extra arguments given. Got $ expected $ [ExtraArgs]"
badIndentation = "Nestable statement requires indentation [BadIndentation]"
invalidContext = "Invalid $ in this context [InvalidContext]"