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

Visual script fails with "Can't convert argument" errors #51855

Closed
pouleyKetchoupp opened this issue Aug 18, 2021 · 4 comments
Closed

Visual script fails with "Can't convert argument" errors #51855

pouleyKetchoupp opened this issue Aug 18, 2021 · 4 comments

Comments

@pouleyKetchoupp
Copy link
Contributor

Godot version

3.4-beta3

System information

Windows 10

Issue description

I've hit some issues with visual scripting when testing the MRP from #45219 on the 3.x branch.
I can't reproduce the issue in 3.3.2-stable.

When trying to run the project, a function call is failing with the error:

SCRIPT ERROR: Cannot convert argument 2 to Vector3.
          at: player_velocity (res://Player.vs:13)

Callstack:

>	godot.windows.tools.64.exe!VisualScriptNodeInstanceFunction::step(const Variant * * p_inputs, Variant * * p_outputs, VisualScriptNodeInstance::StartMode p_start_mode, Variant * p_working_mem, Variant::CallError & r_error, String & r_error_str) Line 279	C++
 	godot.windows.tools.64.exe!VisualScriptInstance::_call_internal(const StringName & p_method, void * p_stack, int p_stack_size, VisualScriptNodeInstance * p_node, int p_flow_stack_pos, int p_pass, bool p_resuming_yield, Variant::CallError & r_error) Line 1543	C++
 	godot.windows.tools.64.exe!VisualScriptInstance::call(const StringName & p_method, const Variant * * p_args, int p_argcount, Variant::CallError & r_error) Line 1889	C++
 	godot.windows.tools.64.exe!Object::call(const StringName & p_method, const Variant * * p_args, int p_argcount, Variant::CallError & r_error) Line 899	C++
 	godot.windows.tools.64.exe!VisualScriptNodeInstanceFunctionCall::step(const Variant * * p_inputs, Variant * * p_outputs, VisualScriptNodeInstance::StartMode p_start_mode, Variant * p_working_mem, Variant::CallError & r_error, String & r_error_str) Line 770	C++
 	godot.windows.tools.64.exe!VisualScriptInstance::_call_internal(const StringName & p_method, void * p_stack, int p_stack_size, VisualScriptNodeInstance * p_node, int p_flow_stack_pos, int p_pass, bool p_resuming_yield, Variant::CallError & r_error) Line 1543	C++
 	godot.windows.tools.64.exe!VisualScriptInstance::call(const StringName & p_method, const Variant * * p_args, int p_argcount, Variant::CallError & r_error) Line 1889	C++
 	godot.windows.tools.64.exe!ScriptInstance::call_multilevel(const StringName & p_method, const Variant * * p_args, int p_argcount) Line 316	C++
 	godot.windows.tools.64.exe!Node::_notification(int p_notification) Line 63	C++
 	godot.windows.tools.64.exe!Node::_notificationv(int p_notification, bool p_reversed) Line 45	C++
 	godot.windows.tools.64.exe!Spatial::_notificationv(int p_notification, bool p_reversed) Line 52	C++
 	godot.windows.tools.64.exe!CollisionObject::_notificationv(int p_notification, bool p_reversed) Line 38	C++
 	godot.windows.tools.64.exe!PhysicsBody::_notificationv(int p_notification, bool p_reversed) Line 41	C++
 	godot.windows.tools.64.exe!KinematicBody::_notificationv(int p_notification, bool p_reversed) Line 264	C++
 	godot.windows.tools.64.exe!Object::notification(int p_notification, bool p_reversed) Line 929	C++
 	godot.windows.tools.64.exe!SceneTree::_notify_group_pause(const StringName & p_group, int p_notification) Line 975	C++
 	godot.windows.tools.64.exe!SceneTree::iteration(float p_time) Line 484	C++
 	godot.windows.tools.64.exe!Main::iteration() Line 2135	C++

Steps to reproduce

-Open MRP from #45219 in the editor
-Run the project
-The game breaks with error

Minimal reproduction project

See #45219

@akien-mga
Copy link
Member

CC @Gallilus (I didn't check if it's related to your changes, but could be.)

@Gallilus
Copy link
Contributor

@akien-mga Indeed,
This is accidental. SetBasicType needs to be sequenced now.
When 4.x works again I'l check the status there. And if required I'l make the PR to add the sequence port to SetBasicType.
This weekend I'l Make a PR to revert this sequence port on the 3.x Branch.

image
image

@Gallilus
Copy link
Contributor

@pouleyKetchoupp Is it ok now?

@pouleyKetchoupp
Copy link
Contributor Author

Yes, confirmed fixed. Thank you!

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

No branches or pull requests

3 participants