local ATTRIBUTES = {
isbn = "",
content = nil
}
local function create_isbn()
local charset = {} do
-- Ký tự [0-9a-zA-Z] dưới dạng mã ASCII: https://www.rapidtables.com/code/text/ascii-table.html
for c = 48, 57 do table.insert(charset, string.char(c)) end
for c = 65, 90 do table.insert(charset, string.char(c)) end
for c = 97, 122 do table.insert(charset, string.char(c)) end
end
ATTRIBUTES.isbn = charset[math.random(1, #charset)] .. charset[math.random(1, #charset)] .. charset[math.random(1, #charset)] .. charset[math.random(1, #charset)] .."-" .. charset[math.random(1, #charset)] .. charset[math.random(1, #charset)] .. charset[math.random(1, #charset)] .. charset[math.random(1, #charset)] .."-" .. charset[math.random(1, #charset)] .. charset[math.random(1, #charset)] .. charset[math.random(1, #charset)] .. charset[math.random(1, #charset)] .."-" .. charset[math.random(1, #charset)] .. charset[math.random(1, #charset)] .. charset[math.random(1, #charset)] .. charset[math.random(1, #charset)]
end
Hello, I’ve been debugging and am confused as to why isbn can’t be updated to its new value? Shouldn’t the script be able to access the table’s property considering the table is part of it? Thanks to anyone who answers.