Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

补充:Lua 进阶知识,单个lua文件内local变量不超过200个 #353

Open
Miss-you opened this issue Aug 5, 2022 · 0 comments
Open

Comments

@Miss-you
Copy link
Contributor

Miss-you commented Aug 5, 2022

单个lua文件内local变量不超过200个

代码:

local s = ""
for i = 1, 1000 do
    s = s.."\nlocal i" .. i .. " = 1"
end
local a = "local function x()\n" .. s .. "\nend"
print(loadstring(a))

运行报错 has more than 200 local variables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant