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

argument list on get_method_list containing only useless data #80216

Closed
MiroloTech opened this issue Aug 3, 2023 · 1 comment
Closed

argument list on get_method_list containing only useless data #80216

MiroloTech opened this issue Aug 3, 2023 · 1 comment
Labels

Comments

@MiroloTech
Copy link

Godot version

4.1.1 stable

System information

Windows 11

Issue description

when trying to acces arguments from the get_method_list() function, it always returns { "name": "arg0", "class_name": &"", "type": 0, "hint": 0, "hint_string": "", "usage": 6 }, instead of the actual data. I acces the data like this:

var methods = p.get_method_list()
var args = methods[0].args

Steps to reproduce

To test, enter this code into empty script and run:

extends Node

func test(a : String, b : String):
	return a + b

func _ready():
	var methods = self.get_method_list()
	for m in methods:
		if m.name == 'test':
			var args = m.args
			print(args)
			
			"""
			should return:
				{ "name": "a", "class_name": "Node", "type" : 4, "hint": .....,
				  "name": "b", "class_name": "Node", "type" : 4, "hint": .....,
				}
			"""

Minimal reproduction project

unneccesarry

@AThousandShips
Copy link
Member

AThousandShips commented Aug 3, 2023

Thank you for reporting

@AThousandShips AThousandShips marked this as a duplicate of #33624 Aug 3, 2023
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

2 participants