Hi all, The lost continent is coming along great, with a lot of new stuffs. However, in order to ease my scripts (crafting scripts and so on), I need to be able to store and retrieve strings from a global script entity.
So I did that:
1st SE :
"crom_variables"
Code: Select all
function setVar(var,number)
var = number
end
function addToVar(var,numbertoadd)
var = var + numbertoadd
end
function subFromVar(var,numbertosub)
var = var - numbertosub
end
try_1 = 0
2nd is whatever, called from a button
Code: Select all
function check()
crom_variables.setVar(try_1,1)
print(crom_variables.try_1)
end
but it returns 0 while I expect 1...
A trip of a thousand leagues starts with a step.