Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does my math variables dont work with print?

Asked by 4 years ago
--Do this:
hello = 50

bye = 20

print(hello+bye)

0
Hope this worked ;) stefcetominecraft1 0 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago

the math variables will work with print but there are 2 different ways to do it. i think its printing in a way you dont want. the way your printing them right now is adding the value of the 2 variables together so it would output 70 in the log. if you want it to print the variables separate but on the same line you would instead do:

local hello = 50

local bye = 20

print(hello,bye)

its a little change but now the output will be 50,20 instead of just 70

im not sure if this is what you were looking for or not but if it was your welcome :)

Ad

Answer this question