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 8569673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:23:29+00:00 2026-06-11T18:23:29+00:00

Does this look right? local data = {} for i = 1, 22 do

  • 0

Does this look right?

local data = {}

for i = 1, 22 do
  table.insert( data, data[i].title = "A title here")
end

I get a syntax error in the insert(), and I’m not sure what’s causing it.
I’m guessing data[i].title isn’t correct.

  • 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-11T18:23:31+00:00Added an answer on June 11, 2026 at 6:23 pm

    I think this is what you’re trying to do:

    local data = {}
    
    for i = 1, 22 do
      local newdata = {
        title = "A title here"
      }
      table.insert(data, newdata)
    end
    

    data[i] will be nil until you create a new table and assign it there. Also, it looks like you’re either trying to insert the title into data or trying to insert a new table into data, it’s hard to tell which. My example is assuming you’re trying to make a new table, assign a title to it, and put that new table in data.

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

Sidebar

Related Questions

I'm concerned my if condition is not correctly formatted. Does this look right to
I'm playing around with async in F#. Does this look right, or am I
First look at this url: https://stackoverflow.com/questions/tagged/xoxoxo/ This directory does not exists but somehow stackoverflow
UPDATE 1: Does this look right? Dim objSqlConnection As SqlConnection Dim objSqlCommand As SqlCommand
Does this look like it should work? I'm wanting to generate directions from one
I was wondering something. How does this email look when it will be send
Look at this code: class MyClass(): # Why does this give me NameError: name
Does this mean I can't update another table from a trigger if I'm using
Here is the error snippet /home/jamesblack/Development/v2server/svr_tick.c:1309: undefined reference to `deflateEnd' This happens when I
Have a look at this picture alt text http://www.abbeylegal.com/downloads/2009-04-01/web%20part%20top%20line.jpg Does anyone know what css

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.