Closed Ivorforce closed 6 days ago
I've had the same problem, and worked around it by making the all function parameters a single varargs
Thanks!
Looks like this is caused by a fairly silly bug in Godot. I just posted PR https://github.com/godotengine/godot/pull/99403 which fixes this in my testing. Please let me know if it works for you!
Godot version
4.3
godot-cpp version
4.3 (56571dc584ee7d14919996c6d58fb5b35e64af63)
System information
macOS
Issue description
When calling a varargs method without arguments, you get a failure:
Varargs calls are not supposed to be validated, so it's probably wrong that it tries to validated-call it in the first place: https://github.com/godotengine/godot/blob/5efd124ca10bf46df62fa2441d80589777e54a5a/modules/gdscript/gdscript_compiler.cpp#L237
This may have to do with the fact that
MethodBind.hint_flags
is never set (neither to vararg static, nor top_flags
) - but then again, I think it's supposed to be determined automatically? I'm not sure, I don't know the source code well enough to provide a quick fix.I don't think this issue occurs in upstream godot, but I haven't extensively checked.
Steps to reproduce
Minimal reproduction project
(or just add as remote / checkout branch)
https://github.com/Ivorforce/godot-cpp/tree/no-arg-varargs