-
Simple math. (Should be anyway)
I have two variables:
Correct
Incorrect
I want to work out a percentage.
(Correct / (Correct plus Incorrect)) X 100
The result should be a percentage.
I'm mucking up the code here I know and I'm almost embarrassed to post it here but here goes......
yourScore = ((correct / (correct - - incorrect))*100);
Note - I have the variables correct and incorrect showing properly in their own text fields so I'm sure I've declared the variables correctly. Just need help with the math bit. I thought it was as simple as how you'd do it on the Mac calculator but apparently not. Note also the " - - " was my attempt instead of using the " + " character.
I AM happy to report that I THINK this might be the final stroke in what's been a fantastic learning experience for me and much to the thanks of this forum!
-
Prid - Outing
code looks right, except for - -
would you mind posting your FLA file?
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
-
Sadly the FLA is MASSIVE still (haven't started optimizing it). But happily the need for the above equation was removed so I'm good but I do thank you for offering to help me sort it out.
-
Designer, Programmer, Musician
Make a duplicate/copy of your FLA, delete all the images of that duplicated FLA from the library, and post it here so we can replace the movieclips with shapes and help fix your code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|