Computer Science Canada help with a yahtzee game |
| Author: | nuno_owns [ Thu Jun 15, 2006 1:50 pm ] | ||
| Post subject: | help with a yahtzee game | ||
my problem is that I can not get the dice to roll with the corresponding pictures. This is what I have now but it does not work.After my if statements at value it says "if must be boolean type".
Thanks for all your help![/code] |
|||
| Author: | jamonathin [ Thu Jun 15, 2006 2:11 pm ] | ||||
| Post subject: | |||||
Well first of all for loops aren't written like You wrote: for dice_1 (1 , 6) but like . .
And secondly, we are comparing the values, not setting the values, so we dont use: You wrote: if value := 1 then but rather . .
The " := " is for setting a value, not comparing. |
|||||
| Author: | neufelni [ Thu Jun 15, 2006 2:12 pm ] |
| Post subject: | |
Your problem is that you are using :=. This is used in Turing to assign values to variables. For if statements you want to just use =. |
|