Skip to content

Commit 42c8fac

Browse files
Use DialogicUtil.get_variable_name() to get the type of the original variable
1 parent b3d5597 commit 42c8fac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

addons/dialogic/Modules/Variable/event_variable.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func _execute() -> void:
9191

9292
if operation == Operations.SET:
9393
result = interpreted_value
94-
elif (typeof(original_value) == Variant.Type.TYPE_STRING and _value_type == VarValueType.STRING and interpreted_value and operation == Operations.ADD):
94+
elif (DialogicUtil.get_variable_type(name) == DialogicUtil.VarTypes.STRING and _value_type == VarValueType.STRING and interpreted_value and operation == Operations.ADD):
9595
result = original_value + interpreted_value
9696
elif not str(original_value).is_valid_float() or not str(interpreted_value).is_valid_float():
9797
printerr("[Dialogic] Set Variable event failed because one value wasn't a float! [", original_value, ", ",interpreted_value,"]")

0 commit comments

Comments
 (0)