This is my first release
I see in a lot of post that people use qf and event flag and it's the way slower and wrong to save data because is very simple bug the flag and because with qf or flag cant save string...
So i do a small release using i/o.
Here we are.
Add two folder in quest: data_local and data_global
Now add this code in quest_lib editing the directory of the two folder
Code:
Data_Local = "/usr/game1/channel1/share_data/locale/germany/quest/data_local/" Data_Global = "/usr/game1/channel1/share_data/locale/germany/quest/data_global/" function write(name,value) name_player = pc.get_name() io.output(Data_Local..pc.get_player_id().."_"..name) io.write(value) io.flush() io.close() end function read(name) name_player = pc.get_name() io.input(Data_Local..pc.get_player_id().."_"..name) local valore=tostring(io.read()) return valore end function write_global(name,value) io.output(Data_Global..name) io.write(value) io.flush() io.close() end function read_global(name) io.input(Data_Global..name) local valore=tostring(io.read()) return valore end
read_global
write_global
read
write
Now I write a simple quest for showing that is the same
Code:
quest testing begin state start begin when 20086.take begin write_global("test","Simple Test with i/o") local i = read_global("test") say(i) end end end