Highlighted

Sum of 3 variables not displaying correctly in browser

New Here ,
Feb 06, 2020

Copy link to clipboard

Copied

Hi, I'm having an issue with version 8.0.0.145 - I have three variables which the user will increment or decrement depending on if they select the correct answer (via buttons). At the end of my custom quiz the individual totals display correctly and reliably in browser and in preview, however elsewhere I would like for the user to see a total of all 3 values. For this I set up a conditional action as follows:

 

If all conditions are true:

1 is equal to 1

 

Actions:

Expression v_AB = A  + B

Expression v_ABC = v_AB + C

Assign v_total with v_ABC

 

A, B, and C are my three variables that display as individual scores elsewhere with no issues. 

 

This works fine in preview, returning a total such as 45 or 51 etc. When published and viewed in browsers it takes the form of a much longer number ie 2213122020 - I thought perhaps these were individual values being displayed however I have character limit set to 50. Would anyone be able to advise where I am going wrong please? 

TOPICS
Advanced actions

Views

95

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Sum of 3 variables not displaying correctly in browser

New Here ,
Feb 06, 2020

Copy link to clipboard

Copied

Hi, I'm having an issue with version 8.0.0.145 - I have three variables which the user will increment or decrement depending on if they select the correct answer (via buttons). At the end of my custom quiz the individual totals display correctly and reliably in browser and in preview, however elsewhere I would like for the user to see a total of all 3 values. For this I set up a conditional action as follows:

 

If all conditions are true:

1 is equal to 1

 

Actions:

Expression v_AB = A  + B

Expression v_ABC = v_AB + C

Assign v_total with v_ABC

 

A, B, and C are my three variables that display as individual scores elsewhere with no issues. 

 

This works fine in preview, returning a total such as 45 or 51 etc. When published and viewed in browsers it takes the form of a much longer number ie 2213122020 - I thought perhaps these were individual values being displayed however I have character limit set to 50. Would anyone be able to advise where I am going wrong please? 

TOPICS
Advanced actions

Views

96

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Feb 06, 2020 0
New Here ,
Feb 06, 2020

Copy link to clipboard

Copied

I'm currently investigating further - I've changed my action as detailed by an older post of Lilybiri so that the variable is repeated, eg 

 

Expression v_AB = A  + B

Expression v_AB = v_AB + C

Assign v_total with v_ABC

 

Also I have found that if I test a mixture of correct and incorrect answers, the score is expressed in single digits, however all correct answers result in this huge number. I've checked all the increments though and none are excessively large, the maximum score from one answer is no more than 4 points? 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 06, 2020 0
Adobe Community Professional ,
Feb 06, 2020

Copy link to clipboard

Copied

You are on Captivate version 8.0.  I would suggest this is probably a bug that got fixed by a later updated to either Cp8 or a later major version.  Please try to update your version with any minor update patches available for Cp8.  If that's not possible, you should really be looking to update to the current major version.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 06, 2020 0
Most Valuable Participant ,
Feb 06, 2020

Copy link to clipboard

Copied

Moreover you don't need such a big amount of variables. This would work perfectly:

  • Exoressuib v_total = v_A + v_B
  • Exoressiuon v_total = v_total + v_C

It looks like the numbers are interpreted in some variables as strings. Can you replace them by the two commands above?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 06, 2020 0
Adobe Community Professional ,
Feb 06, 2020

Copy link to clipboard

Copied

Lieve.  I have a vague memory about this being a bug in the early versions of Cp8.  I cannot be certain, and neither can I verify anything because I (like yourself) no longer have earlier versions on my PC.  But it would make sense to me that before making too many attempts to fix this issue, the user should FIRST make sure they have all the latest bug fixes for that version.  Otherwise we could all end up chasing our tails trying to find a solution.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 06, 2020 0
Lilybiri LATEST
Most Valuable Participant ,
Feb 06, 2020

Copy link to clipboard

Copied

Agres, Rod. First versionbof 8 was buggy. Did not repeat that because you
already told.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 06, 2020 0