Javascript to round up percentage Nov 08, 2023 By Sandy Dutra Does anyone have the javascript code to round up the percentage for quiz results? Thanks Sandy
Ron Price Partner 6 months ago11/08/23 at 1:40 pm (UTC) Here is a script we have used to round up a variable named "Quantity". We have two variables here - "Quantity" and "RoundedQuantity" var player=GetPlayer(); var RoundedQuantity = player.GetVar("Quantity"); RoundedQuantity = Math.round(RoundedQuantity); player.SetVar("Quantity", RoundedQuantity);
1 Reply
Here is a script we have used to round up a variable named "Quantity". We have two variables here - "Quantity" and "RoundedQuantity"