I'm having a problem with some simple math in AMS 5. I've enclosed my code that shows the problem below - with the responsible lines highlighted in red.
This is code for a Volume Up button. The problem is that this whole shebang works great until I get the volume of the video under 5. If I get down to 4 (using the volume down button), I cannot get the button to increment the volume up anymore. Once I get to zero, that's where I am forced to stay.
It seems buggish to me, since there's no apparently reasonable explanation for this behavior. What is of particular interest is that the reverse of this situation is not true once I get the volume up to 96.
I guess I could just drop the nice volume tethers at the top and bottom because of this issue, but I'd like an explanation regardless.
Anyone have a suggestion for something I'm doing wrong?
The first part of the code that checks the status of the video is implemented to deactivate button sounds while the video is playing.
Incidentally, the Paragraph.SetText command is for a paragraph object where I report the current volume based on the 'v' variable.Code:IsPlaying = Video.GetState("Video1"); if (IsPlaying == 0 or IsPlaying == 1) then Audio.Load(CHANNEL_EFFECTS, "AutoPlay\\Audio\\Click1.ogg", true, false); end v = Video.GetVolume("Video1"); if (v < 95) and (v > 4) then Video.SetVolume("Video1", v + 5); end if (v >= 95) and (v < 100) then Video.SetVolume("Video1", v + 1); end if (v <= 4) then Video.SetVolume("Video1", v + 1); end Paragraph.SetText("volumetext", v);


