How to set var1 = var1+var2*var3

Hello people, im back with a new problem i hope to get some help with.
Im trying to set var1 to be equal to var1+var2*var3 but i can’t figure out how to do it. I thought you just had to enclose it in parentheses but i cant for the life of me get it to work.
I would be grateful for any help.

This should work:

*set var1 (var1 + (var2*var3))

5 Likes

Thank you very much, that was exactly the solution i was looking for.

2 Likes

I think you can just do:

*set var1 + (var2 * var3)

1 Like

Yes, we can!

Since concatenating also requires the use of parentheses, I try to keep my scripting as uniform as I can, even when not required to.

1 Like

2 posts were merged into an existing topic: [CSIDE] The ChoiceScript IDE (v1.3.3 Now Available — 05/09/2022)

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.