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 » Scripters
Home Search
 

Re: Plugin Data

Previous Thread :: Next Thread 
Ozzypig is not online. Ozzypig
Joined: 27 Mar 2008
Total Posts: 4906
22 Oct 2011 04:01 PM
Is there any way to save data with plugins so that the plugin can load the data automatically on the next load?

If so, speak it here.

If not, we need to make a S&I post.

~Ozzy
roblox.com/my/groups.aspx?gid=372
Report Abuse
Danster5oo is not online. Danster5oo
Joined: 27 Aug 2010
Total Posts: 10003
22 Oct 2011 04:02 PM
Data Persistence?
Report Abuse
crazypotato4 is not online. crazypotato4
Joined: 22 Feb 2010
Total Posts: 20000
22 Oct 2011 04:03 PM
Can plugins access settings()? If so, that could be a way to do it... :D?
Report Abuse
Ozzypig is not online. Ozzypig
Joined: 27 Mar 2008
Total Posts: 4906
22 Oct 2011 04:05 PM
@Danster Data Persistence only works with ROBLOX Servers (Online mode) and plugins cannot be used with online mode.

@crazypotato4 I'll check. If we can set a string in settings() we can save some data :3

~Ozzy
roblox.com/my/groups.aspx?gid=372
Report Abuse
bombpaw is not online. bombpaw
Joined: 15 Mar 2009
Total Posts: 3484
22 Oct 2011 04:05 PM
They do access settings(), placing something in there creates a whole new set of settings ._.

And it stays there too!
Report Abuse
bombpaw is not online. bombpaw
Joined: 15 Mar 2009
Total Posts: 3484
22 Oct 2011 04:06 PM
You have to place an instance! nothing else.
Report Abuse
Danster5oo is not online. Danster5oo
Joined: 27 Aug 2010
Total Posts: 10003
22 Oct 2011 04:07 PM
Then it looks like the admins are going to need to do
*sun glasses*
work.
Report Abuse
Ozzypig is not online. Ozzypig
Joined: 27 Mar 2008
Total Posts: 4906
22 Oct 2011 04:07 PM
Yep, just confirmed they can access settings. Now how do we set values in it?

~Ozzy
roblox.com/my/groups.aspx?gid=372
Report Abuse
crazypotato4 is not online. crazypotato4
Joined: 22 Feb 2010
Total Posts: 20000
22 Oct 2011 04:09 PM
Try just saying settings().PluginData = "oyus" or something :l
Report Abuse
Danster5oo is not online. Danster5oo
Joined: 27 Aug 2010
Total Posts: 10003
22 Oct 2011 04:10 PM
'oyus'
*cough* 93 *cough*
Report Abuse
Ozzypig is not online. Ozzypig
Joined: 27 Mar 2008
Total Posts: 4906
22 Oct 2011 04:11 PM
@crazypotato4 It doesn't like it. It acts like a ROBLOX object ("derp is not a valid member of GlobalSettings", type(settings()) --> userdata)

~Ozzy
roblox.com/my/groups.aspx?gid=372
Report Abuse
bombpaw is not online. bombpaw
Joined: 15 Mar 2009
Total Posts: 3484
22 Oct 2011 04:11 PM
Let me repost for those who didn't see ​>.>

"They do access settings(), placing an instance in there creates a whole new set of settings ._.
And it stays there too!"
Report Abuse
crazypotato4 is not online. crazypotato4
Joined: 22 Feb 2010
Total Posts: 20000
22 Oct 2011 04:13 PM
@bombpaw: how2do that plz
Report Abuse
Ozzypig is not online. Ozzypig
Joined: 27 Mar 2008
Total Posts: 4906
22 Oct 2011 04:14 PM
TEST CODE:

print("____________________")

settings = settings()

print(pcall(function ()
print(settings.Name)
end))

print(pcall(function ()
settings.Name = "herp"
end))

print(pcall(function ()
print(settings.Name)
end))

print("____________________")

It's persistent between loadings of plugins in the *same* ROBLOX window. If you run the above code twice (loading plugins twice) you'll get different output. To (re)load the plugins you just open a new place.

~Ozzy
roblox.com/my/groups.aspx?gid=372
Report Abuse
Ozzypig is not online. Ozzypig
Joined: 27 Mar 2008
Total Posts: 4906
22 Oct 2011 04:17 PM
OMG OMG OMG OMG OMG OMG

I figured it out. I added "HERP DERP" (an IntValue) to settings() and it stayed there between loads of ROBLOX!

*gasp*

~Ozzy
roblox.com/my/groups.aspx?gid=372
Report Abuse
crazypotato4 is not online. crazypotato4
Joined: 22 Feb 2010
Total Posts: 20000
22 Oct 2011 04:18 PM
So it's like

Instance.new("IntValue", settings()).Name = "DERP"

And then you can go like

settings().DERP = 4

?

:O
Report Abuse
Ozzypig is not online. Ozzypig
Joined: 27 Mar 2008
Total Posts: 4906
22 Oct 2011 04:18 PM
> settings = settings(); for k, v in pairs(settings:GetChildren()) do print(k, v) end

I got this:

1 Game Options
2 Lua
3 Diagnostics
4 Physics
5 Network
6 FastLogSettings
7 Authoring
8 Task Scheduler
9 Rendering
10 Selection
11 HERP DERP
12 HERP DERP
13 HERP DERP

The three HERP DERPS are from the three times I ran the code.

~Ozzy
roblox.com/my/groups.aspx?gid=372
Report Abuse
crazypotato4 is not online. crazypotato4
Joined: 22 Feb 2010
Total Posts: 20000
22 Oct 2011 04:18 PM
Or settings().DERP.Value = 4 I guess?

:O
Report Abuse
Anaminus is not online. Anaminus
Top 100 Poster
Joined: 29 Nov 2006
Total Posts: 5945
22 Oct 2011 04:19 PM
You're good at reading replies, I see.
Report Abuse
Ozzypig is not online. Ozzypig
Joined: 27 Mar 2008
Total Posts: 4906
22 Oct 2011 04:21 PM
@Ana he was really vague, I guess. When he said "placing something in there creates a whole new set of settings" I thought he meant that it cleared the settings.

QUICK! Someone document this.

~Ozzy
roblox.com/my/groups.aspx?gid=372
Report Abuse
aboy5643a is not online. aboy5643a
Joined: 20 Nov 2010
Total Posts: 2785
22 Oct 2011 05:50 PM
*gasp*
Brb, gotta go implement this into all of my plugins. Oh. And now we can make single player games without characters :D :D :D :D :D :D :D
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
22 Oct 2011 06:03 PM
I knew about this like two months ago :/
Report Abuse
NecroBumpist is not online. NecroBumpist
Joined: 12 Sep 2010
Total Posts: 4198
22 Oct 2011 06:09 PM
>make virus plugin
>it spams millions of objects in settings()
>no more HDD space
Report Abuse
bombpaw is not online. bombpaw
Joined: 15 Mar 2009
Total Posts: 3484
22 Oct 2011 06:16 PM
>makes an anti to NecroBumpist's virus
Report Abuse
blocco is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
22 Oct 2011 06:20 PM
settings() doesn't just *ACT* like an object. It *is* an object.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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