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

Shorter way of adding to a variable?

Asked by
Benbebop 1049 Moderation Voter
4 years ago

Quick one here.

Usually the way I add to a variable is:

Value = Value + 1

but I remember reading that another way to do it would be:

Value + 1

Which looks way better in my opinion. Though it doesn't work, is there something minute I'm missing or am I getting my languages mixed up?

Ive already tried searching it up but I haven't found anything related.

1 answer

Log in to vote
1
Answered by
Borrahh 265 Moderation Voter
4 years ago

You are Programming in LUA, I believe that the only that to add Anything to a Variable it the way

Value = Value + 1

I don't believe that there is any other way to do that.

0
Then I must have gotten Batch mixed up with LUA, thanks. Benbebop 1049 — 4y
0
-1 for spelling Lua as an acronym programmerHere 371 — 4y
Ad

Answer this question