This is the code
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook("die","save_die") function save_die(id) 	if (player(id,"usgn")>0) then 		io.output(io.open("sys/lua/RWsaves/"..player(id,"usgn")..".txt","w+")) 		io.write(exp[id].." "..level[id].." "..HPP[id].." "..APP[id].." "..SPP[id].." "..Point[id].." "..hasbomber[id].." "..hassuper[id].." "..hascyborg[id].." "..hastrooper[id].." "..KHPP[id].." "..KAPP[id].." "..KSPP[id].." "..KR[id].." "..KD[id]) 		io.close() 	end end
LUA ERROR :sys/lua/TotalWar.lua:805: attempt to concatenate field '?' (a nil value)
line 805 was the io.write
im aleready put array and other thingies but still cant fix this.
Help!