So, here it is:
It saves a file, but when i join the game they say "Your Save File Is Not Found!". There's no errors in the console... Help?
Scripts
Save Script...
Save Script...
1

local prs
function Save(id)
	if player(id,"exists") and player(id,"usgn")>0 then
		f = assert(io.open("sys/lua/Script/Saves/Saves.sav"..player(id,"usgn")..".txt","w"))
		f:write("Blah blahblah blah blahblahblah")
		f:close()
	end
end
if f then
if f ~= nil then
if f ~= false then -- or if f ~= 0 then -- or possibly even if #f > 0 then
if f ~= nil then
break
for repeat while
addhook("leave","Save")
function Save(id)
	if player(id,"exists") and player(id,"usgn")>0 then
		f = assert(io.open("sys/lua/Script/Saves/Saves.sav"..player(id,"usgn")..".txt","w"))
		f:write("DataToSave")
		f:close()
	end
end
addhook("join","Load")
function Load(id)
	if player(id,"usgn") > 0 then
		f = io.open("sys/lua/Script/Saves/Saves.sav"..player(id,"usgn")..".txt","r")
		if f ~= nil then
			msg2(id,"©000255000Your save file is found!@C")
			LoadedData = f:read("*all")
			f:close()
		else
			msg2(id,"©255000000Your Save File Is Not Found!@C")
		end
	end
end
1
