You must log in or register to comment.
If you want to set a value of string to a variable, enclose them in quotations.
On line 176, you are doing
[rank = apprentice, '']^[age == 6]
however,apprentice
as a variable doesn’t exist. Which is why rank returns undefined when the age is 7. I would assume that it should be a string[rank = "apprentice", '']^[age == 6]
.Then on debugging (Line 178), it should also be using strings e.g.
[rank == "kit"]^[age <= 6]
[rank == "apprentice"]^[6 < age && age <=12]
Thanks, but now it isn’t updating at all.