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
I have a node with 2 or more declared functions. Each function has different argument type and name. func public_setPositionX(x : float): .. func public_setCaption(caption : String): .. (node is the node with the script with those functions) for p in node.get_method_list(): print(p["args"]) print(p["args"][0]["type"])
I got the same output:
[{ "name": "arg0", "class_name": &"", "type": 0, "hint": 0, "hint_string": "", "usage": 6 }]
So no way to get the argument name as "x" for instance, type and value, how can i do that please?
Thank you very much
Steps to reproduce
func public_setPositionX(x : float):
..
func public_setCaption(caption : String):
..
(node is the node with the script with those functions)
for p in node.get_method_list():
print(p["args"])
print(p["args"][0]["type"])
The text was updated successfully, but these errors were encountered:
KStormStudio
changed the title
Retrieving argument from a function doesnt return type, value and argument name
Retrieving argument from a function using .get_method_list() doesnt return type, value and argument name
Feb 13, 2023
Godot version
4.0 beta 14
System information
Win 11
Issue description
I have a node with 2 or more declared functions. Each function has different argument type and name.
func public_setPositionX(x : float): .. func public_setCaption(caption : String): .. (node is the node with the script with those functions) for p in node.get_method_list(): print(p["args"]) print(p["args"][0]["type"])
I got the same output:
[{ "name": "arg0", "class_name": &"", "type": 0, "hint": 0, "hint_string": "", "usage": 6 }]
So no way to get the argument name as "x" for instance, type and value, how can i do that please?
Thank you very much
Steps to reproduce
func public_setPositionX(x : float):
..
func public_setCaption(caption : String):
..
(node is the node with the script with those functions)
for p in node.get_method_list():
print(p["args"])
print(p["args"][0]["type"])
The text was updated successfully, but these errors were encountered: