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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:58:00+00:00 2026-06-10T18:58:00+00:00

Please, help me figure out what is the problem in the code. I am

  • 0

Please, help me figure out what is the problem in the code.
I am defining a function

local function goOnLesson()
   if date.hour==1  then
   index=1
   local subj=schToday[index]
   local text = display.newRetinaText("А сейчас у тебя: "..subj, 0, 0, native.systemFont, 70)
   text:setTextColor(128,64,0)
   text:setReferencePoint(display.CenterReferencePoint)
   localGroup:insert(text)
   end
end

And when I’m running it, everything is fine.

I reorganized the code and I don’t need if block anymore

local function goOnLesson()
   index=1
   local subj=schToday[index]
   local text = display.newRetinaText("А сейчас у тебя: "..subj, 0, 0, native.systemFont, 70)
   text:setTextColor(128,64,0)
   text:setReferencePoint(display.CenterReferencePoint)
   localGroup:insert(text)
end

I just removed if-end block but now it doesn’t work.
Please help 🙂

  • 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-10T18:58:01+00:00Added an answer on June 10, 2026 at 6:58 pm

    This error appears to be a generic message when there is a run-time error during the execution of Corona events. I found several references to the same issue (for example, here).

    It’s possible that schToday doesn’t have any elements, and your subj variable gets a nil value, which then fails on string concatenation. You original code probably “works” because it doesn’t get into that section (your day.hour == 1 condition returns “false” most of the time).

    I suggest you doublecheck your code to make sure it works as you expect it to work.

    Another thing to try is to localize your index variable. It’s possible that you assign a value to it that breaks something in other parts of your program.

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

Sidebar

Related Questions

Please help me to figure out what is wrong with this code: I have
Can someone please help me figure out a way to achieve the following (see
Please help me to figure this out. I am having two tab bar items
Please help me. I can't figure out why I get a core dumped when
Ok, so I'm having a problem trying figure out the problem in my code.
I can't figure out where is the problem with this simple code, I think
Please help me figure a single query that will transform the data below... |id
First of all, please help me out! I can not take this anymore. I
I have a big problem, I can't figure out why mutexes in C don't
Please help me somebody to convert unicodestring into string This is how i am

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.