so I haven't really did anything because roblox studio crashes on me. So I was thinking if you can do variable += 1 like in a script
x = 0
while true do
x += 1
end
instead of
for x = 0, ? do
print('idk")
end
so I haven't really did anything because roblox studio crashes on me. So I was thinking if you can do variable += 1 like in a script
x = 0
while true do
x += 1
end
instead of
for x = 0, ? do
print('idk")
end
No += increment is not possible, neither is ++
you will have to do x = x + 1;
As for your second example, I don't know what language that is from. but the ? by itself holds no value in Lua.
I recommend you take a look at syntax of Lua.
+= is an increment exclusive to Python 2
MANY languages support x += as a shortcut to x = x +. It's odd that you'd pick specifically Python 2, when Python 3 also supports the feature.
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Note that "Roblox Lua" is not its own language; rather Lua with disabled libraries and some modified functions + Roblox API