Difference between revisions of "Error Messages/40018"
AManandhar (talk | contribs) m (→Remedies) |
AManandhar (talk | contribs) |
||
Line 5: | Line 5: | ||
= Cause = | = Cause = | ||
− | This error is caused when a global variable is assigned inside another variable definition. You can only assign values to local variables defined by using var inside the definition. | + | This error is caused when a global variable is assigned inside another variable definition. You can only assign values to local variables defined by using var inside the definition. <br> |
+ | Changing the value of the global variable inside another variable is, generally, not a good practice. | ||
= Remedies = | = Remedies = | ||
− | + | ||
− | |||
One way to get around this issue is to use a Button which can have side effects and can assign to global variable. [[Scripting|Scripts and Buttons]] are only available in Analytica Enterprise and higher. | One way to get around this issue is to use a Button which can have side effects and can assign to global variable. [[Scripting|Scripts and Buttons]] are only available in Analytica Enterprise and higher. |
Revision as of 01:53, 28 January 2010
Error Message Examples
You can only assign to a local variable. X is not a local variable.
Cause
This error is caused when a global variable is assigned inside another variable definition. You can only assign values to local variables defined by using var inside the definition.
Changing the value of the global variable inside another variable is, generally, not a good practice.
Remedies
One way to get around this issue is to use a Button which can have side effects and can assign to global variable. Scripts and Buttons are only available in Analytica Enterprise and higher.
You can also assign to a global variable, V, from the definition of X when V is defined as ComputedBy(X). Here is a link to the documentation of function ComputedBy.
Comments
<comments />
Enable comment auto-refresher