question

Stella avatar image
0 Likes"
Stella asked Stella commented

FLexScript Error Variables

I have been trying to resolve this issue of assigning variables. See example showing in the image. Unfortunately, I need help resolving this Primer_4-3a.fsm1727906111712.png

FlexSim 24.2.0
flexscript error
1727906111712.png (177.8 KiB)
primer-4-3a.fsm (107.8 KiB)
5 |100000

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

1 Answer

Regan Blackett avatar image
0 Likes"
Regan Blackett answered Stella commented

Hi @Stella,

The FlexScript error in your screenshot is because the black-lettering word None is being assumed to be a bit of custom code that you have written into that text box. Since the system thinks it's code, it sees it and says, "I don't know what that word means". If you truly don't want to use that property field, click the red X next to it so that it replaces your "None" with a purple "None", which the system recognizes.

There's a couple of other things in that activity that may cause you some issues.

First, in you "Create In" property you have the expression Storage[token.Storage], the word "Storage" has a special meaning in FlexSim's language, and I would recommend avoiding using it as a label or variable name to avoid confusion.

Second, The Create In field is expecting a reference to a specific object in the 3D model where the created components can be placed, like a Queue or a Processor. Your expression would try to put the created components into an Array-indexed position within the Storage class-object of FlexSim's language. "Storage" is more like concept that defines what Storage objects can do, rather being a storage object itself so we can't put things inside it.


· 1
5 |100000

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

Stella avatar image Stella commented ·
Thank you. My error disappeared after I deleted None and after I made changes to the Storage name to Storehouses.
0 Likes 0 ·