lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



First: I've never worked with metatables yet- so this is a metatable question set.

Ok, the idea  is:

LUA states connected across the internet using UDP.
LUA tables are 'Master' mode on one client and 'Shadow' mode on the rest.
The Shadow cannot be edited, but gets the changes when the table is altered on the owner.

I already have the UDP networking code working.

I need:

To edit the metatables of the tables so that:

1.) The 'Master' table sends out changes when its keys are assigned. Would that be the 'newindex' metatable entry?

2.) The 'Shadow' table cannot be edited (no key assignments). Could that be done with the 'newindex' metatable entry?

Thanks,
Jason

_________________________________________________________________
Get fast, reliable access with MSN 9 Dial-up. Click here for Special Offer! http://click.atdmt.com/AVE/go/onm00200361ave/direct/01/