This is our old Q&A Site. Please post any new questions and answers at

Hi, I'm new to Lua and I want to know the statement ( init_Listener() ) that written at the end of the function init_Listener, what is the benefit from it??

asked 04 Sep '12, 01:36

Leena's gravatar image

accept rate: 0%

init_listener() is probably what you have seen in the following example:

In that example it's just a self declared function in the code that will called as soon as the Lua file gets loaded. You don't have to wrap the Lua Listener code into its own funtion, as done in the example. It's just one way. See the other Lua Examples for different ways.


permanent link

answered 04 Sep '12, 02:24

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
accept rate: 15%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 04 Sep '12, 01:36

question was seen: 2,064 times

last updated: 04 Sep '12, 02:24

p​o​w​e​r​e​d by O​S​Q​A