Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8406081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:00:20+00:00 2026-06-09T23:00:20+00:00

I have written some lua code like this: local a1 = 1 local a2

  • 0

I have written some lua code like this:

local a1 = 1
local a2 = 2
local a3 = 3
local a4 = 3
local a5 = 3
local a6 = 3
local a7 = 3
local a8 = 3
local a9 = 3
local a10 = 3

local a11 = 3
local a12 = 3
local a13 = 3
local a14 = 3
local a15 = 3
local a16 = 3
local a17 = 3
local a18 = 3
local a19 = 3
local a20 = 3

local a21 = 3
local a22 = 3
local a23 = 3
local a24 = 3
local a25 = 3
local a26 = 3
local a27 = 3
local a28 = 3
local a29 = 3
local a30 = 3

local a31 = 1
local a32 = 2
local a33 = 3
local a34 = 3
local a35 = 3
local a36 = 3
local a37 = 3
local a38 = 3
local a39 = 3

local a40 = 3
local a41 = 3
local a42 = 3
local a43 = 3
local a44 = 3
local a45 = 3
local a46 = 3
local a47 = 3
local a48 = 3
local a49 = 3
local a50 = 3

local a61 = 3
local a62 = 3
local a63 = 3
local a64 = 3
local a65 = 3
local a66 = 3
local a67 = 3
local a68 = 3
local a69 = 3
local a70 = 3

local function fun1(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
    print('.......')
end

local function fun2()
    fun1(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
    fun1(a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
    fun1(a21, a22, a23, a24, a25, a26, a27, a28, a29, a30)
    fun1(a31, a32, a33, a34, a35, a36, a37, a38, a39, a40)
    fun1(a41, a42, a43, a44, a45, a46, a47, a48, a49, a50)
    fun1(a51, a52, a53, a54, a55, a56, a57, a58, a59, a60)
    fun1(a61, a62, a63, a64, a65, a66, a67, a68, a69, a70)
end

and i got an error like this when ran this code:

    78: function at line 71 has more than 60 upvalues

i know this kind of code is ugly and i can use some way else to do it (like table), but this kind of code may be written by my users.

can someone explain this for me, and tell me how to avoid this? thanks very much.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T23:00:22+00:00Added an answer on June 9, 2026 at 11:00 pm

    tell me how to avoid this?

    There’s the old joke. A guy walks into a doctor’s office and says, “It hurts when I raise my arm like this.” The doctor says, “So don’t raise your arm like that.”

    If your users write Lua code that does not compile, that’s not something you can fix. This is no more illegitimate a compile error than something like:

    if condition  --forgot the then
      return something
    end
    

    So if your code is going to accept arbitrary Lua scripts to compile and execute, it will need to be able to deal with Lua scripts that don’t compile. For whatever reason.

    If compilation fails, report the error to the user and recover the best you can.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written some code that looks more or less like this: QVector<QRgb> colorTable(256);
I have written some thing like this to fetch data from the database. public
I have written some code using express.js which I'd like to put on the
I have written some jQuery code, this is a part of it. this always
I have written some code that loads an XML document using an XmlDocument object
I have written some code for displaying a drop down list, but the code
I have written some code in JSP to download .docx files which is hosted
I have written some code for playing a .wav through my application. Now I
I have written some jQuery ajax code where I am sending a request to
I have written some code to ensure that items on an order are all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.