Page 1 of 1

A Question About Saved Lua Variables

Posted: Sun Aug 23, 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: Sun Aug 23, 2020 20:27
by Löbby
You need to define global variables for that