From 57fe664a50b17aa36d803289e6456b0d7ea8f074 Mon Sep 17 00:00:00 2001 From: tarsJr <41229348+tarsJr@users.noreply.github.com> Date: Mon, 29 Nov 2021 03:19:16 +0530 Subject: Lua: use of loadstring replaced with load; loadstring is deprecated. (#4275) --- lua.html.markdown | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lua.html.markdown') 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. --]] -- cgit v1.2.3