summaryrefslogtreecommitdiffhomepage
path: root/lua.html.markdown
diff options
context:
space:
mode:
authortarsJr <41229348+tarsJr@users.noreply.github.com>2021-11-29 03:19:16 +0530
committerGitHub <noreply@github.com>2021-11-28 22:49:16 +0100
commit57fe664a50b17aa36d803289e6456b0d7ea8f074 (patch)
tree41adc7d001014abade3e66eafcb11cd4d29c440b /lua.html.markdown
parent3aa763520bb0d40e4ddb1f0d23bd693a548071a4 (diff)
Lua: use of loadstring replaced with load; loadstring is deprecated. (#4275)
Diffstat (limited to 'lua.html.markdown')
-rw-r--r--lua.html.markdown5
1 files changed, 3 insertions, 2 deletions
diff --git a/lua.html.markdown b/lua.html.markdown
index 4a470623..e32a275d 100644
--- a/lua.html.markdown
+++ b/lua.html.markdown
@@ -383,8 +383,9 @@ dofile('mod2.lua') --> Hi! (runs it again)
-- loadfile loads a lua file but doesn't run it yet.
f = loadfile('mod2.lua') -- Call f() to run it.
--- loadstring is loadfile for strings.
-g = loadstring('print(343)') -- Returns a function.
+-- load is loadfile for strings.
+-- (loadstring is deprecated, use load instead)
+g = load('print(343)') -- Returns a function.
g() -- Prints out 343; nothing printed before now.
--]]