adding variables

I wanted to add scores, like score + tempscore but from what I am doing it's not working.

@set totalscore = 0
@set score1 = 20
@set score 2 = 10

and I wanted to make it like this

totalscore = score1 + score2


@set totalscore = 0
@set score1 = 20
@set score2 = 10

        var total = squiffy.get("score1") + squiffy.get("score2");
        squiffy.set("totalscore", total);
        
The totalscore is: {totalscore}

Oooh, thank you very much


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums