makereadonly
Makes a table read-only, so writing to it raises an error. The same as setreadonly(tab, true).
Signature
makereadonly(tab: { any }): ()Parameters
tab{ any }The table to lock.
Returns
Nothing.
Note
Example
local settings = { mode = "safe" }
makereadonly(settings)
print(isreadonly(settings)) --> true
print(pcall(function()
settings.mode = "fast"
end)) --> false