Lua, how many of you know it?

Random irrelevance that just didn't fit into other forums. Talk about anything.

Moderator: Talkative People

User avatar
M_D_K
Chaos Rift Demigod
Chaos Rift Demigod
Posts: 1087
Joined: Tue Oct 28, 2008 10:33 am
Favorite Gaming Platforms: PC
Programming Language of Choice: C/++
Location: UK

Re: Lua, how many of you know it?

Post by M_D_K »

to fake OO don't you have to make a table then override the _init or something, I don't know either, but I use it. Tested it by making pong 8-)
Gyro Sheen wrote:you pour their inventory onto my life
IRC wrote: <sparda> The routine had a stack overflow, sorry.
<sparda> Apparently the stack was full of shit.
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: Lua, how many of you know it?

Post by Falco Girgis »

yeah, something to do with tables and metatables. I tried it once (semi blindly), but then I started with toLua++, which has real Lua OO, so I'm proudly ignorant.
danR369
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 11
Joined: Thu Oct 23, 2008 10:27 am

Re: Lua, how many of you know it?

Post by danR369 »

You have to make they empty object (the table), set the metamethod to __index, then set the metatable.
User avatar
M_D_K
Chaos Rift Demigod
Chaos Rift Demigod
Posts: 1087
Joined: Tue Oct 28, 2008 10:33 am
Favorite Gaming Platforms: PC
Programming Language of Choice: C/++
Location: UK

Re: Lua, how many of you know it?

Post by M_D_K »

^ what he said :)
Gyro Sheen wrote:you pour their inventory onto my life
IRC wrote: <sparda> The routine had a stack overflow, sorry.
<sparda> Apparently the stack was full of shit.
Post Reply