diff --git a/Docs/API.md b/Docs/API.md index 71f654cb2..1dadfff4f 100644 --- a/Docs/API.md +++ b/Docs/API.md @@ -111,7 +111,9 @@ The Lua state and all local variables are reset after each game reload. For keep Example: ```lua -PersistentVars = {} +if not PersistentVars then + PersistentVars = {} +end ... -- Variable will be restored after the savegame finished loading function doStuff()