ok will give it a try later after doing some backups cheers m8.
Edit : gives an error "invalid escape sequence"
hmm just found this:
A simple file open operation uses the following statement.
file = io.open (filename [, mode])
The various file modes are listed in the following table.
Sr.No. Mode & Description
1
"r"
Read-only mode and is the default mode where an existing file is opened.
2
"w"
Write enabled mode that overwrites the existing file or creates a new file.
3
"a"
Append mode that opens an existing file or creates a new file for appending.
4
"r+"
Read and write mode for an existing file.
5
"w+"
All existing data is removed if file exists or new file is created with read write permissions.
6
"a+"
Append mode with read mode enabled that opens an existing file or creates a new file.
so hopefully this will work lol using w+ instead of w
g_coins = 0
g_kills = 0
g_kills2 = 0
g_kills3 = 0
g_kills4 = 0
function delete_dat_init(e)
end
function delete_dat_main(e)
if g_Entity[e]['plrinzone'] == 1 then
-- Create local variable file and link it to temp.dat
local file = io.open("temp.dat", "w+") -- All existing data is removed if file exists or new file is created with read write permissions.
-- Write player data to file
file:write(
g_coins .. "\n" ..
g_kills .. "\n" ..
g_kills2 .. "\n" ..
g_kills3 .. "\n" ..
g_kills4 .. "\n")
file:close()
end
end
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
XFX R5 2gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel
I only smile because i have absolutely no idea whats going on