>on mouseUp me
>
> if myScore<pScoreValue04 then
> alert"Your Score ain't worth Shit!"
> end if
>
> if myScore> pScoreValue04 then
> pScoreValue04 = myname&&myScore
> end if
>
> if myScore> pScoreValue03 then
> if myScore< pScoreValue02 then
> pScoreValue03 = myname&&myScore
> end if
> end if
>
>
> if myScore> pScoreValue02 then
> pScoreValue02 = myname&&myScore
> end if
>
> if myScore> pScoreValue01 then
> pScoreValue01 = myname&&myScore
> end if
>
>end mouseUp me
I can see you're trying to do a high score table, and there are
probably better ways to do it. For now though, the problem with your
approach is that more than one of the scores will show the new high
score. For example, if the player scores more that the current
pScoreValue02, then the second if statement will put that name and
score into the 4th slot, then the second to last if statement will
also put it into 2nd place.
You really want to move the scores down as a new high score comes in,
so this might work:
on mouseup me
if myScore <= pScoreValue04 then --check for <=, not just <
alert "Try harder next time."
exit -- no need to do the other if checks
end if
--by now we know that the score is better than 4th place
pScoreValue04 = pScoreValue03
if myScore > pScoreValue03 then
pScoreValue03 = pScoreValue02
else
pScoreValue04 = myScore
exit --make sure not to change the other scores
end if
if myScore > pScoreValue02 then
pScoreValue02 = pScoreValue01
else
pScoreValue03 = myScore
exit --make sure not to change the other score
end if
if myScore > pScoreValue01 then
pScoreValue01 = myScore
else
pScoreValue02 = myScore
end if
end mouseup
Think of any new score, and follow through the script carefully. It
should fit into the right place, and push the lower scores down the
list by one place.
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]