7z99
(cody)
January 18, 2023, 9:22pm
#1
Interpolated strings with if-then-else expressions make the script editor think an additional ‘end’ is necessary.
I expect the script editor to know an additional end is not expected and not add an additional end.
Where it happens: Studio only, any game.
When it happens: First noticed it January 10 2023 at ~3:42 PM AST
Repro instructions:
1- Paste the following in the script editor:
local a = `{ if true then 'a' else 'b' }`
2- Press enter.
Video demo:
3 Likes
Focia19
(Focia19)
January 18, 2023, 9:32pm
#2
We’ve filled a ticket into our internal database for this issue, and will come back as soon as we have updates!
Thanks for flagging!
2 Likes
7z99
(cody)
January 21, 2023, 3:49am
#3
@Focia19 ,
I’m not sure if I should make a separate bug report as unsure whether or not they’re related, but it also seems to happen with nested if-then-else expressions as well, so:
local a = if true then if true then 'a' else 'b' else 'c'
will give you the same behaviour of the script editor expecting the redundant end
1 Like
7z99
(cody)
April 12, 2023, 4:54am
#4
This seems to have been fixed after the first Studio update following the release of interpolated strings
1 Like
system
(system)
Closed
April 26, 2023, 4:55am
#5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.