Skip to content

Commit

Permalink
Fixed comparing signle arg to all method args
Browse files Browse the repository at this point in the history
  • Loading branch information
EiTaNBaRiBoA committed Jul 22, 2024
1 parent d272791 commit 2219dc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/SignalEvent/SignalEvent.gd
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ static func _validateAmountArgs(callable: Callable, all_args: Array) -> bool:
static func _validateArgs(callable: Callable, all_args: Array) -> bool:
for method: Dictionary in callable.get_object().get_method_list():
if method.name == callable.get_method():
for i in method.args.size():
for j in all_args.size():
var verificationType: bool = false # Defaults to false, so if nothing is valid it will return false
for j in all_args.size():
for i in method.args.size():
if typeof(all_args[j]) == method.args[i].type&&i == j: # # Comparing if they are the same index
verificationType = true
if not verificationType: return false # if all didn't match
Expand Down

0 comments on commit 2219dc9

Please sign in to comment.