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 |
|
|
| |
|
|
| 22 Oct 2011 04:03 PM |
| Can plugins access settings()? If so, that could be a way to do it... :D? |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| Joined: 15 Mar 2009 |
| Total Posts: 3484 |
|
|
| 22 Oct 2011 04:06 PM |
| You have to place an instance! nothing else. |
|
|
| Report Abuse |
|
|
|
| 22 Oct 2011 04:07 PM |
Then it looks like the admins are going to need to do *sun glasses* work. |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 22 Oct 2011 04:09 PM |
| Try just saying settings().PluginData = "oyus" or something :l |
|
|
| Report Abuse |
|
|
| |
|
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
|
  |
| 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 |
|
|
| |
|
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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 22 Oct 2011 04:18 PM |
Or settings().DERP.Value = 4 I guess?
:O |
|
|
| Report Abuse |
|
|
Anaminus
|
  |
 |
| Joined: 29 Nov 2006 |
| Total Posts: 5945 |
|
|
| 22 Oct 2011 04:19 PM |
| You're good at reading replies, I see. |
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|
|
| 22 Oct 2011 06:03 PM |
| I knew about this like two months ago :/ |
|
|
| Report Abuse |
|
|
|
| 22 Oct 2011 06:09 PM |
>make virus plugin >it spams millions of objects in settings() >no more HDD space |
|
|
| Report Abuse |
|
|
bombpaw
|
  |
| Joined: 15 Mar 2009 |
| Total Posts: 3484 |
|
|
| 22 Oct 2011 06:16 PM |
| >makes an anti to NecroBumpist's virus |
|
|
| Report Abuse |
|
|
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 |
|
|