generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

New to metatables, tutorials or code snippets?

Previous Thread :: Next Thread 
VanillaLight is not online. VanillaLight
Joined: 02 Nov 2013
Total Posts: 834
06 Jan 2014 07:43 PM
Hey guys, obviously from the title I am in need of help with metatables and methods. My overall project is to make an extensible command structure but I need to learn how to properly use metatables for lookup on indexes. I am quite desperate in help and any information would be greatly appreciated!

Thanks
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
06 Jan 2014 07:59 PM
setmetatable to set a metatable to a table
getmetatable to get a metatable of a table
metatables can have metatables
rawget gets from a table without invoking metamethods
rawset sets a key in a table without invoking metamethods
rawequal compares a table to something without invoking metamethods

__index invoked when table[key] is nil
__newindex invoked when table[key] is nil
__call invoked when table(arguments)
__add, __sub, __mul, __div, __mod, __unm are invoked when +-*/%-ing a table
etc
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image