Skip to content

Commit 3c2845e

Browse files
Fix for #1499 (#1501)
* Fix for #1499 Strings weren't correctly identified in the set variable event execution.
1 parent 4e96ee4 commit 3c2845e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

addons/dialogic/Events/Variable/event_variable.gd

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ func _execute() -> void:
4040
if name:
4141
var orig :Variant= dialogic.VAR.get_variable(name)
4242
if value and orig != null:
43-
var the_value :Variant = dialogic.VAR.get_variable(value)
43+
var the_value :Variant
44+
match _value_type:
45+
0: the_value = dialogic.VAR.get_variable('"'+value+'"')
46+
2: the_value = dialogic.VAR.get_variable('{'+value+'}')
47+
1,3,4: the_value = dialogic.VAR.get_variable(value)
48+
4449
if operation != Operations.Set and str(orig).is_valid_float() and str(the_value).is_valid_float():
4550
orig = float(orig)
4651
the_value = float(the_value)

0 commit comments

Comments
 (0)