Issue Type: |
Status: |
Priority: |
Date Submitted: |
Votes: |
Bug |
Completed |
Critical |
Sun 6th Nov 2011 |
3 votes
|
|
Found in version: |
Last Updated: |
Completed in version: |
Date Completed: |
Track Changes: |
5.0.21 |
Sat 8th Dec 2012 |
5.0.27 |
Fri 7th Dec 2012 |
Log In |
|
saabie | | Sun 6th Nov 2011 06:56 |
In restriction [Variable][Cash][must be][equal to][expression], (where Cash is integer variable) if a simple integer constant is entered then it works correctly, but any equation (ie. 10+1) always evaluates to zero.
This was tested by observing that the restriction always passes if Cash=0 and fails if Cash is equal to the expected result of the equation.
If a set-property action is used to set a text property to an expression, the property is simply set to the text in the expression field instead of evaluating the expression.
In both these cases Adrift acts as though the expression field is actually a 'constant' field.
These need to be fixed so the expression is evaluated.
(Expessions ARE currently evaluated in a set-variable action)
It would actually be a good idea to have 'constant' as a third option for the variable/expression button as well, (for TEXT expressions).
|
|
ElliotM | | Tue 3rd Jan 2012 05:13 |
Hmm, some this might explain why one of my projects gave me unexpected results. Good find, Saabie. |
|
saabie | | Sun 2nd Sep 2012 07:33 |
version 5.0.24 correctly evaluates expressions in a set-property action, but the expression field of variable and property restrictions still acts like a string constant.
|
|
saabie | | Sat 10th Nov 2012 03:36 |
Expressions in a set-property action are broken again in 5.0.26, the expression is copied into the text property as if it was a string constant.
Setting a text property to a variable doesn't work either, it just copies the name of the variable into the text property.
|
|
Campbell | | Fri 7th Dec 2012 23:00 |
Ok, I think this is all working now. Setting text variables seems to work ok for me in 5.0.26 anyway tho. I'll mark this as completed, but if you could send me a sample to check against that would be fantastic. |
|
Campbell | | Sat 8th Dec 2012 17:40 |
http://forum.adrift.co/viewtopic.php?f=14&t=8476 |