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
Describe the bug
Have an External Function in your Ink with a parameter that is populated with a blank value eg. "", you get the following error on line 1411 in ink_story.gd (Godot4 branch) when you handle the External Function.
while i < number_of_arguments:
var popped_obj = InkUtils.as_or_null(self.state.pop_evaluation_stack(), "Value")
var value_obj = popped_obj.value_object
arguments.append(value_obj)
i += 1
The error in this case is: Invalid get index 'value_object' (on base: 'Nil').
popped_obj renders as Void when I do a print on it.
To Reproduce
Add an External Function in Ink with a parameter
In your Ink code, call the External Function and populate the parameter as ""
Bind/call the External Function via InkGD. You'll get the error documented above.
Expected behavior
Null/blank values passed into External Functions are considered acceptable values and do not throw errors. In my specific scenario, I have a random variable that populates 25% of the time. In the scenarios when it is blank, I'd like that blank result to be passed via External Function the same way as any other parameter. I can technically workaround this with a specific nuller External Function, but that's not my preference.
Ink files
ink_story.gd
Environment:
OS: Windows 11
Godot version: Godot 4.2 mono
inkgd version: godot4 branch
The text was updated successfully, but these errors were encountered:
Bard09
changed the title
call_external_function chokes when a parameter is blank/Nil
call_external_function errors when a parameter is blank/Nil
Feb 2, 2024
Bard09
changed the title
call_external_function errors when a parameter is blank/Nil
call_external_function errors when a parameter is populated with a blank/Nil value
Feb 2, 2024
Describe the bug
Have an External Function in your Ink with a parameter that is populated with a blank value eg. "", you get the following error on line 1411 in ink_story.gd (Godot4 branch) when you handle the External Function.
The error in this case is: Invalid get index 'value_object' (on base: 'Nil').
popped_obj renders as Void when I do a print on it.
To Reproduce
Expected behavior
Null/blank values passed into External Functions are considered acceptable values and do not throw errors. In my specific scenario, I have a random variable that populates 25% of the time. In the scenarios when it is blank, I'd like that blank result to be passed via External Function the same way as any other parameter. I can technically workaround this with a specific nuller External Function, but that's not my preference.
Ink files
ink_story.gd
Environment:
The text was updated successfully, but these errors were encountered: