Sorry this happened, but I've encountered an error I cannot solve. The error is below:
Generated code at (1354, 102) Non-invocable member 'GeneratedCode.oziOvyJTl7.VentityRuntimeModel_GC.MainCollection_belief_meme' cannot be used like a method. (context: initializing; trigger "Support Decision 1" invoker for "Support Decision 1"., in voter)
On action Support Decision 1, changing from a Process List to a Command still gives the same error, even though Belief Meme is not used on the diagram or references. It does appear as a property of the Invoker.
Thanks!
Error Generated code at (1354, 102)
-
- Senior Member
- Posts: 68
- Joined: Wed Sep 15, 2004 9:01 pm
- Vensim version: DSS
Error Generated code at (1354, 102)
- Attachments
-
- RDem 2.zip
- (24.09 KiB) Downloaded 414 times
Re: Error Generated code at (1354, 102)
Not immediately obvious - I'll take a deeper look.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Error Generated code at (1354, 102)
The problem is that there is a reference Voter.Support Decision 1 that confuses the trigger’s intended link to the action of the same name. If you delete the reference, it runs.
This is a fairly subtle problem, and we'll have to add a graceful error message for this, but for the sake of completeness, here's how I spotted it. My default procedure is to start deleting things recently added/modified. The generated code error mentions Support Decision 1, so I deleted that. Model runs. Then I recreated the trigger to see what went wrong. When setting up the action field, I noticed this:
There are really only 2 legit cases for name duplication: the attribute/reference pair you get when an attribute has its 'refers to' type set, and an action and trigger of the same name (not required, but I often find it useful). So this was a red flag for me. We'll probably change the name rules to prevent this.
This is a fairly subtle problem, and we'll have to add a graceful error message for this, but for the sake of completeness, here's how I spotted it. My default procedure is to start deleting things recently added/modified. The generated code error mentions Support Decision 1, so I deleted that. Model runs. Then I recreated the trigger to see what went wrong. When setting up the action field, I noticed this:
There are really only 2 legit cases for name duplication: the attribute/reference pair you get when an attribute has its 'refers to' type set, and an action and trigger of the same name (not required, but I often find it useful). So this was a red flag for me. We'll probably change the name rules to prevent this.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/