Another Variable Calculation Problem
March 4, 2009 12:00 AM
Okay....so now I need to have a variable, Yardline, which is equal to 10 minus the value of the variable Yardage. (Background: As you can tell, this is a football-themed activity and the premise of the activity is that we're starting at the 10-yard line. In the feedback, I need to be able to tell the user both how many yards they gained and what yard line they're on now.)Since typing 10-VAR(Yardage) in the Value field for Yardline didn't work (much as when I was trying to subtract one variable from another in the Value field in my previous post), I thought I'd try the same general approach I used with my other problem. I first set Yardline to equal 10 in one action and then, in a second action, told it to take Yardline and subtract Yardage from it. The result for Yardline it displayed in my feedback text was 10 (it should have been 4, since Yardage at that point was equal to 6) and, when I did it in debug mode, I saw that it actually considered the Yardline value invalid after firing the second action. My husband, who's a programmer, thinks that maybe it's reading the 10 that I set the value to in the first action as an alpha value instead of a numeric value, which would explain why it's still displaying 10 (since you can't subtract a numeric value from an alpha one).So, is there any way that I can actual do this calculation?? If my husband's guess is correct, is there any way to indicate that I mean the *number* 10 (like by using a $ or something?). Or is there some other way I can accomplish what I'm trying to do?Helllllllp!Laura
Discussions have been disabled for this post