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
 

Re: storing functions in tables

Previous Thread :: Next Thread 
Brofessions is not online. Brofessions
Joined: 30 Jul 2012
Total Posts: 214
12 Aug 2012 05:50 PM
Let's say I have a script like this:

function hello(derp)
print(derp)
end

How would I store it into a table without running it
Report Abuse
rockgangster6 is not online. rockgangster6
Joined: 08 Jun 2008
Total Posts: 92
12 Aug 2012 05:51 PM
Theres multiple ways. Please add a bit more information on your topic
Report Abuse
Brofessions is not online. Brofessions
Joined: 30 Jul 2012
Total Posts: 214
12 Aug 2012 05:54 PM
I tried this:

table = {
["herp"] = {
function help()
end
}
}

but this doesn't work

I just want to store a function into a table
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
12 Aug 2012 05:55 PM
tab = {
["Derp"] = function(herp)
print(herp)
end
}

tab.Derp('hullo')

-[::ƧѡÎḾḠΰῩ::]-[::Maker of stuff and Helper of Scripting::]-
Report Abuse
Brofessions is not online. Brofessions
Joined: 30 Jul 2012
Total Posts: 214
12 Aug 2012 05:58 PM
Thanks. That works fine.
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