Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mono] Node.Call() silently fails #59830

Closed
Tracked by #60036
nonunknown opened this issue Apr 3, 2022 · 4 comments · Fixed by #79249
Closed
Tracked by #60036

[Mono] Node.Call() silently fails #59830

nonunknown opened this issue Apr 3, 2022 · 4 comments · Fixed by #79249

Comments

@nonunknown
Copy link
Contributor

Godot version

v4.0.alpha.mono.custom_build [a647fb3]

System information

manjaro KDE

Issue description

When you use Node.call() if the args of the function doesnt exacly matches the target node's function it doesnt report to the user that the target function doesnt exists!

PS: I tested only in C# but not sure about gdscript

Steps to reproduce

  • create a script
  • copy the following script:
extends Node

func _ready() -> void:
  call("test_func") # should not work because test_func has a number argument, but godot doesnt report this user mistake
  pass

func test_func(number:float) -> void: print(number)
public partial class Test : Node
{

  public override void _Ready()
  {
    Call("TestFunc"); //should not work because test_func has a number argument, but godot doesnt report this user mistake
  }
  
  public void TestFunc(float number)
  {
    GD.Print(number);
  }
}

Minimal reproduction project

N/a

@KoBeWi
Copy link
Member

KoBeWi commented Apr 3, 2022

Can't reproduce in GDScript:
image
Could be C#-only.

@nonunknown
Copy link
Contributor Author

thanks for testing, so its C# only!

@nonunknown nonunknown changed the title Node.call() silently fails [Mono] Node.call() silently fails Apr 3, 2022
@nonunknown nonunknown changed the title [Mono] Node.call() silently fails [Mono] Node.Call() silently fails Apr 3, 2022
@GeorgeS2019
Copy link

@KoBeWi @nonunknown could the discussion here be relevant? Explain why c# only.

@raulsntos
Copy link
Member

I tested and managed to reproduce this in v3.5.beta3.mono.official [3c0d325] so it's not exclusive to 4.0.
I can also confirm is C# only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants