Jump to content




How to create objects?


  • You cannot reply to this topic
2 replies to this topic

#1 Konlab

  • Members
  • 595 posts
  • LocationKerbin

Posted 18 May 2014 - 11:07 AM

Please tell me how to create objects in lua (and please don't give me links!)
Thanks!

#2 CometWolf

  • Members
  • 1,283 posts

Posted 18 May 2014 - 11:09 AM

local obj = {}


#3 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 18 May 2014 - 11:10 AM

With code.

What is the objection to links? There is lots of valuable information to be found out there, such as the PIL, or the lua-users wiki. We're not here to spoon-feed you every iota of information about a given subject; you are responsible for putting in the effort to learn the subject matter from the materials provided. This is a subject that has been covered repeatedly in this section, so there are lots of topics here you could read through to learn more.

Edit: CometWolf, should've just left it at:

local obj

I think the table declaration is too helpful, in this case.





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users