Why does this fail at runtime?
local x = {“temp”: 1};
assert(typeof(x) == “table”); // Runtime error on this line: “cannot convert the string”
The following test succeeds:
if (typeof(x) == “table”)
{ server.log(“it’s a table!”); } // displays “it’s a table!”
Is this a bug?
(There is a similar assertion in the tempbug code: assert(typeof(data == “table”)); However, I think that line has the parentheses in the wrong place. But I still don’t understand why this assert doesn’t fail - for some reason ‘data’ must equal “table” I suppose.)