vscode-lua icon indicating copy to clipboard operation
vscode-lua copied to clipboard

floor division "//" not recognized

Open froschl opened this issue 4 years ago • 2 comments

The new (5.3) floor division "//" seems to be not recognised...

local horOffset = i // 4

it says: expression expected near '/' luaparse

https://www.lua.org/manual/5.3/manual.html#3.1 https://www.lua.org/manual/5.3/manual.html#3.4.1

froschl avatar Jul 09 '20 18:07 froschl

Did you set lua.targetVersion to 5.3 in the extension's settings? That fixed it for me... it defaults to 5.1.

jthile avatar Sep 16 '20 12:09 jthile

Did you set lua.targetVersion to 5.3 in the extension's settings? That fixed it for me... it defaults to 5.1.

ah, sorry - my fault RTFM ;-) thanks for the hint...

froschl avatar Sep 16 '20 13:09 froschl