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

UndoRedo.add_do_method fails when arguments are null #43141

Closed
Jummit opened this issue Oct 27, 2020 · 2 comments
Closed

UndoRedo.add_do_method fails when arguments are null #43141

Jummit opened this issue Oct 27, 2020 · 2 comments
Labels

Comments

@Jummit
Copy link
Contributor

Jummit commented Oct 27, 2020

Godot version:
3.2.4

Issue description:
UndoRedo.add_do_method throws an error:
add_do_method: Condition "action_level <= 0" is true.
<C++ Source> core/undo_redo.cpp:112 @ add_do_method()

if any parameter is null:

func create_action():
	call("multiple_parameters") # fails, not enough arguments
	call("multiple_parameters", null, null) # works

	undo_redo.add_do_method(self, "multiple_parameters") # fails, as expected
	undo_redo.add_do_method(self, "multiple_parameters", null, null) # also fails
	undo_redo.add_do_method(self, "multiple_parameters", null, "some value") # also fails

func multiple_parameters(arg1, arg2):
	pass

Steps to reproduce:
Call UndoRedo.add_do_method with null as one parameter.

@Zylann
Copy link
Contributor

Zylann commented Oct 27, 2020

Similar to #36895 ?

@Jummit
Copy link
Contributor Author

Jummit commented Oct 27, 2020

Similar to #36895 ?

Yep :D

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

No branches or pull requests

3 participants