Obviusly not the full solution, but might help:
high_score = {}
function write_score_init(e)
end
function write_score_main(e)
for i = 1,#high_score,1 do
file = io.open("high_score.txt", "a+") -- file will be create, if does not exists -- append data
file:write(high_score[i] .."\n")
file:close()
end
end
hth
3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz
OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics