Page 1 of 1

A Question About Saved Lua Variables

Posted: 23 Aug 2020, 17:27
by KINGTUT10101
If I save a variable within "function script:update ()" using the following, is that variable not accessable from other functions, like "function script.nextDay ()" for example?

Code: Select all

local name = Util.optStorage(City.getStorage(), script:getDraft():getId())

Re: A Question About Saved Lua Variables

Posted: 23 Aug 2020, 20:27
by JustAnyone
You need to define global variables for that