01-05-2021, 08:42 AM
There are 2 separate bugs discussed:
1
The in text code in the first email was from a consequence of a hop, in which the between value was saved to pending.
The consequence begins with an (if... condition that has two branches, each with an (and ... enclosing 3 parallel consequences.
One branch adds to the score, the other subtracts.
The player appears to be matching both branches as if it considers the If condition both true and false. I say this because it gives me a popup choice when I click a single jump destination of a score increase, or a score decrease move.
Then, depending on other factors, such as whether I used "Player", "Each" or "All" in the Occupied by: ... or whether I had split the conditions at the move level instead of the consequence level ... the choice was executed according to what I selected during the trial, or according to what I had coded.
-- but in any case, I shouldn't see the popup choice: the logic shouldn't be both true and false at the same time.
If so it would mean it is a runtime error, and should stop gracefully. - or the compiler should tell me that the syntax is wrong eg. not every role can be used with Occupied by: in conjunction with a component, if that is the problem.
====================================================
2) Separate problem:
I tried to use set the value of a piece in the equipment section, and got the Unexpected Syntax errors shown in message #3 - they are examples based on different things I tried that seemed to be according to the documentation. I tried:
(piece "Disc" Each value:10)
(piece "Disc" P1 value:10)
(piece "Disc" value:10)
None of them worked. I was trying to use this value for (addScore Mover (value Piece of:(what at:(value Pending)))) to modify the score during a jump without testing directly for what piece it was, in order to generalize the code.
The documentation states value can be set in the equipment section for a variety of purposes, but does not tell what purposes or limitations on its use. This seemed like an obvious purpose to me.
In the end I gave up and used a define instead. What could have beenwrong wrong with the syntax?
1
The in text code in the first email was from a consequence of a hop, in which the between value was saved to pending.
The consequence begins with an (if... condition that has two branches, each with an (and ... enclosing 3 parallel consequences.
One branch adds to the score, the other subtracts.
The player appears to be matching both branches as if it considers the If condition both true and false. I say this because it gives me a popup choice when I click a single jump destination of a score increase, or a score decrease move.
Then, depending on other factors, such as whether I used "Player", "Each" or "All" in the Occupied by: ... or whether I had split the conditions at the move level instead of the consequence level ... the choice was executed according to what I selected during the trial, or according to what I had coded.
-- but in any case, I shouldn't see the popup choice: the logic shouldn't be both true and false at the same time.
If so it would mean it is a runtime error, and should stop gracefully. - or the compiler should tell me that the syntax is wrong eg. not every role can be used with Occupied by: in conjunction with a component, if that is the problem.
====================================================
2) Separate problem:
I tried to use set the value of a piece in the equipment section, and got the Unexpected Syntax errors shown in message #3 - they are examples based on different things I tried that seemed to be according to the documentation. I tried:
(piece "Disc" Each value:10)
(piece "Disc" P1 value:10)
(piece "Disc" value:10)
None of them worked. I was trying to use this value for (addScore Mover (value Piece of:(what at:(value Pending)))) to modify the score during a jump without testing directly for what piece it was, in order to generalize the code.
The documentation states value can be set in the equipment section for a variety of purposes, but does not tell what purposes or limitations on its use. This seemed like an obvious purpose to me.
In the end I gave up and used a define instead. What could have beenwrong wrong with the syntax?