I would like to start of with saying that I've reed the "Read this post before asking questions", since my error message is covered quite early in that post, but i still can not find a solution. Everything seams fine in my eyes, but then again I've been staring at this error trying to figure out a solution, for the last hour or so… I would be happy if there were someone that could explain what I'm doing wrong! :)/>/>
The error message mark the line "file.write(textutils.seri…)" as the source of failure. ("attempt to index ? (a nil value)")
dir = "client/main"
function saveUserInfo(dir)
local username = {"user1", "user2", "user3"} -- Here you need to define all defaul usernames
local password = {"password1", "password2", "password3"} -- Here you define what password each default user has
local file = fs.open("UserInfo/"..dir, "w")
print("Successfully opened file...") --debugging
file.write(textutils.serialize(username).."\n"..textutils.serialize(password))
file.close()
Thanks in advance!
//bbaayyeerr