A Question About Saved Lua Variables

Plug-in related stuff can be discussed here.

Moderator: Plugin Moderators

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2056
Joined: Thu Jul 07, 2016 22:50
Location: 'Merica
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

A Question About Saved Lua Variables

#1

Post 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())

User avatar
JustAnyone
enjenir
Reactions:
Posts: 2960
Joined: Sun Jul 23, 2017 12:45
Location: Easter Island
Plugins: Show

Re: A Question About Saved Lua Variables

#2

Post by JustAnyone »

You need to define global variables for that

Post Reply Previous topicNext topic

Return to “Plug-In Discussion”