You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
valkyrienyanko
changed the title
[Godot 4 Beta 7] TweenCallback does not find methods with parameters
[4.0 Beta 7] TweenCallback does not find methods with parameters
Dec 3, 2022
I believe that's expected, tween callbacks need to be parameterless. Unfortunately, Godot doesn't support typed Callables so the compiler can't help you here, but it would be the equivalent of Action in C#.
When porting your MRP to GDScript I get this error:
ERROR: Error calling method from CallbackTweener: 'Node3D(Node3D.gd)::foo': Method expected 1 arguments, but called with 0
The error in C# is not incorrect, Foo(int) and Foo() have different signatures so they are technically different methods and C# can't find Foo(), but the error could be more user-friendly, there's an issue about this already: #35910.
In GDScript, if the method you are using has parameters you can pass them using bind as explained in the documentation:
Godot version
v4.0.beta7.mono.official [0bb1e89]
System information
Windows 10, RX 6600, 10400
Issue description
TweenCallback
can not find methods with parameters, although it can find methods without parameters just fine.Steps to reproduce
The following code will reproduce the error.
Error shown in console
Minimal reproduction project
Test2.zip
The text was updated successfully, but these errors were encountered: