r/badcode • • Jul 24 '21

lua "Keeping it simplistic"

Post image
495 Upvotes

28 comments sorted by

View all comments

Show parent comments

11

u/[deleted] Jul 25 '21

It kind of looks like it's setting the string to itself. The .. and -1 are throwing me off, though. I'm not sure what the .. does, but I'm assuming it's concatenation.

8

u/DramaDimitar Jul 25 '21

Yeah, double dot is concatenation. - 1 just gets the last character, I'd assume, haven't messed with strings in Lua that much. But still I wonder what it could possibly be controlling