Help, 4DScript error keeps occuring

All topics on coding 4Dscript in Enterprise Dynamics.
Post Reply
Jordivank
Posts: 5
Joined: Friday 17 January, 2014 - 11:39

Help, 4DScript error keeps occuring

Post by Jordivank »

Hello,

I am building a model to simulate some sealocks (school project).

Everytime I run my simulation an error keeps popping up.
4DScipt:error at '':='':Acces violation at address 00000000. Read of address 00000000

Does anyone know how I can fix the error? I have checked all my atoms (about 50).
The only thing that has a := combination is the trigger on exit. Which I put on the SetLabel, this is standard code so I did not add anything myself besides the labelname and value.

Examples of my trigger on exit:
SetLabel([Zeeschip 0-900], i) := 1
SetLabel([Binnenschip 330], i) := 11

Hope someone can be of help to me.

Best Regards,
Jordi
User avatar
MatthijsJongboer
Posts: 200
Joined: Thursday 11 November, 2010 - 14:12

Re: Help, 4DScript error keeps occuring

Post by MatthijsJongboer »

Hello Jordi,

Have a close look at the required syntax.
Either use Label(....) := or Setlabel(...).
What you are trying to do is change the result of setlabel (instead of changing the label).
This results in an error.
Jordivank
Posts: 5
Joined: Friday 17 January, 2014 - 11:39

Re: Help, 4DScript error keeps occuring

Post by Jordivank »

Thank you for you quick reaction,

It works fine now.
Post Reply