I read that you can carry more than that lives and healt, you can take a look if that's okay?
I have doubts about this:
StartVars: close ()
Setg_gold (and temp [1])
Setg_points (temp [2])
-- Created by Corno_1
local vars_imported = 0
local vars_exported = 0
local startGold = 0
local startPoints = 0
function export_values_init(e)
end
function export_values_main(e)
if g_gold < 1 then
writeLiveHealthInFile(startPoints,startGold)
end
if vars_imported == 0 then
local temp = {}
local StartVars = io.open("scriptbank/Corno_1/LevelValuesImExport/values.saves", "r")
local i = 1
while i <= 2 do
temp[i] = StartVars:read("*line")
local indexOfChar = string.find(temp[i],"=")
if indexOfChar ~= nil then
temp[i] = string.sub(temp[i],indexOfChar+1)
i=i+1
end
end
StartVars:close()
Setg_gold(e,temp[1])
Setg_points(temp[2])
vars_imported = 1
end
if g_Entity[e]['plrinzone']==1 then
if vars_exported == 0 then
writeLiveHealthInFile(g_gold,g_points)
vars_exported = 1
end
end
end
function writeLiveHealthInFile(g_gold,g_points)
local temp = {}
local StartVars = io.open("scriptbank/Corno_1/LevelValuesImExport/values.saves", "w")
StartVars:write("g_gold=" .. g_gold .."\n")
StartVars:write("g_points=" .. g_points)
StartVars:close()
end
My Pc Specs : Win10pro64bit /Msi z97 / i74770k / gtx1070 / 16gb ram / SSD 850Evo