1
LUA ERROR: sys/lua/functions.lua:7: attempt to index local 'file' (a nil value)
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
function _save(id) local usgn = player(id,"usgn") local ip = player(id,"ip") if usgn > 0 then local file = io.open(dir.."saves/"..usgn..".txt","w+") local cell, prison_time, mute_time, red, green, blue, vlu = cell_number[id], prison_seconds[id], mute_seconds[id], Player[id].r, Player[id].g, Player[id].b, Player[id].v file:write(cell.."\n"..prison_time.."\n"..mute_time.."\n"..red.."\n"..green.."\n"..blue.."\n"..vlu) print("\169000255000Saved "..usgn) file:close() end end
So does anyone knows how to fix this?
Thanks.