question

Shinya O avatar image
0 Likes"
Shinya O asked Shinya O commented

Syntax error when adding pick option

Hi,

I encountered a syntax error when adding pick options.

It looks like there's something wrong with the auto-generated flexscript.

This phenomenon was found in FlexSim2021.0 and was not improved even after converting to FlexSim2023.0.

It's also strange that the "{" is green because there are no blank lines on lines 65 and 66 of the On Arrival Trigger in DP1.

I would like to explain this phenomenon to my customer, do you have a good explanation?

Thanks in advance.

1689731883714.gif

1689732774288.png

DP_sample.fsm

FlexSim 23.0.8
pick optiondesion point
1689731883714.gif (1.2 MiB)
1689732774288.png (25.0 KiB)
dp-sample.fsm (36.5 KiB)
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

Hi @Shinya O, was Kavika F's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·
Shinya O avatar image Shinya O Jason Lightfoot ♦♦ commented ·

I am waiting for @Kavika F 's reply to my post.

0 Likes 0 ·

1 Answer

Kavika F avatar image
1 Like"
Kavika F answered Shinya O commented

Hey @Shinya O, for the first issue, I can replicate your error with the model you've provided, but I can't seem to replicate it with a new Decision Point I drag out from the Library. I'm using v23.0.9, and the panels look slightly different when you select the different DPs. Also, if you remove some of the existing triggers and add them back, it seems to work fine. Is there a specific set of steps that you take to produce this error consistently?

For the second issue, that seems to be a visual bug considering the code still runs even with that "commented" curly brace. I'll add that to the dev list - to fix the syntax highlighting in that scenario. Thank you for pointing this out.

· 4
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Kavika F avatar image Kavika F ♦ commented ·

Upon further investigation, it seems that there's a bad spacing character in the code. If you delete the last two back-slashes (\\) from line 91, you'll notice that the curly brace on line 92 is no longer green. This also fixes the syntax error you get after adding the "Enter Restricted Area" PickOption.

1689782037373.png

0 Likes 0 ·
1689782037373.png (7.7 KiB)
Shinya O avatar image Shinya O Kavika F ♦ commented ·

For the first issue, I do not know how to reproduce this issue with a specific procedure from a new model. There is no information other than that it was created by some procedure using FlexSimJapanese 2021.

For the second issue, thank you for your reply. I hope the visual bug is fixed soon.

I found that by opening the code of the On Arrival trigger in the corresponding model and pressing "Apply", no syntax error appeared. For some reason FlexScript fails to compile properly?

0 Likes 0 ·
Kavika F avatar image Kavika F ♦ Shinya O commented ·

Hey @Shinya O, the two issues are related. The visual bug is caused by the same thing that is causing the flexscript compilation error. To avoid this, do as you said and hit "Apply" to get rid of the error. The dev team has opened a case for this already.

Is there something else you had a question about?

0 Likes 0 ·
Show more comments