Set variable to sum of two numbers or to sum of two other variables parsed as number

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Lucraft3000

Member
Apr 10, 2021
1
0
1
Hello.

I have problems to define a variable to the sum of two numbers or two other variables:

command /calculator [<number>] [<number>]:
trigger:

set {_1} to a random number between 1 and 10
set {_2} to a random number between 1 and 10
set {_3} to sum of {_1} and {_2}

I hope you can help me.
Best regards.
 
Code:
set {_3} to {_1} + {_2}
The other lines were ok, instead of sum of x and y you have to put x + y
 
Status
Not open for further replies.