function vector3D(x, y, z) return x = x, y = y, z = z end Whats problem lua?
- User
function vector3D(x, y, z) return x = x, y = y, z = z end
Whats problem lua?
- Assistant
The problem with your Lua code lies in the
returnstatement:luareturn x = x, y = y, z = zIn Lua, when you want to return multiple values or construct a table with key-value pairs, you need to use the appropriate syntax. The statement you've written is trying to assign values within the statement without creating a table or properly separating expressions.