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
 

How do I check if a table has a new item in it?

Previous Thread :: Next Thread 
boynedmaster is not online. boynedmaster
Joined: 28 Jun 2008
Total Posts: 9735
11 Aug 2011 12:53 PM
This might be a stupid question.
Report Abuse
boynedmaster is not online. boynedmaster
Joined: 28 Jun 2008
Total Posts: 9735
11 Aug 2011 01:00 PM
Bump
Report Abuse
boynedmaster is not online. boynedmaster
Joined: 28 Jun 2008
Total Posts: 9735
11 Aug 2011 01:24 PM
Bump
Report Abuse
boynedmaster is not online. boynedmaster
Joined: 28 Jun 2008
Total Posts: 9735
11 Aug 2011 01:32 PM
Bump
Report Abuse
boynedmaster is not online. boynedmaster
Joined: 28 Jun 2008
Total Posts: 9735
11 Aug 2011 01:34 PM
HELP ME
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
11 Aug 2011 01:35 PM
tab={}
setmetatable(tab,{
__newindex=function(t,i,v)
print("umg new index "..i.." valued "..v.." added to tabul")
end}
Report Abuse
boynedmaster is not online. boynedmaster
Joined: 28 Jun 2008
Total Posts: 9735
11 Aug 2011 01:38 PM
wait a sec.

Perhaps I should word it differently.

How do I check if a table has a new item in it with Gmod Lua?

I'm trying to check if a player joined in Gmod Lua :P
Report Abuse
doepey590 is not online. doepey590
Joined: 16 Sep 2008
Total Posts: 1187
11 Aug 2011 01:51 PM
Metatables are vanilla Lua, they should work in Gmod
Report Abuse
boynedmaster is not online. boynedmaster
Joined: 28 Jun 2008
Total Posts: 9735
11 Aug 2011 01:52 PM
Okay. I'll return with a script to ask if it's right.
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
11 Aug 2011 01:53 PM
Noob question what's Gmod or Gmod Lua?
Report Abuse
boynedmaster is not online. boynedmaster
Joined: 28 Jun 2008
Total Posts: 9735
11 Aug 2011 01:55 PM
@RATEX

Gmod is Garry's Mod:A sandbox game


@Others

This is Gmod Lua. If a new item is added to the table, would it return true?

function CheckForNewItemInTable(table)
setmetatable(tab,{
__newindex=function(t,i,v)
return true
end}
end
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