|
| 13 Jan 2014 08:34 PM |
I am making a knock off of cookieclicker but I want the data to save how would I save the intvalue? The location is game.StarterGui.clicker.cookies.numbcookies
numbcookies is the int value I want to save can anyone help |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 13 Jan 2014 08:36 PM |
Player:WaitRorDataReady() Player:SaveNumber(LoacaionOfValue.Value,Nameofsave) |
|
|
| Report Abuse |
|
|
|
| 13 Jan 2014 08:37 PM |
| nameofsave? What would go there? |
|
|
| Report Abuse |
|
|
shonclub
|
  |
| Joined: 05 Sep 2009 |
| Total Posts: 1331 |
|
|
| 13 Jan 2014 08:40 PM |
:WaitForDataReady() :SaveString("Admin","true")
:LoadString("Admin") -- returns true if saved correctly |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 13 Jan 2014 08:40 PM |
| A string. It can be anything as long as you will load from that. |
|
|
| Report Abuse |
|
|
shonclub
|
  |
| Joined: 05 Sep 2009 |
| Total Posts: 1331 |
|
|
| 13 Jan 2014 08:40 PM |
| 'true' as a string, not bool. |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 13 Jan 2014 08:41 PM |
| I reversed the parameters, did I? |
|
|
| Report Abuse |
|
|
shonclub
|
  |
| Joined: 05 Sep 2009 |
| Total Posts: 1331 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 13 Jan 2014 08:42 PM |
| Shon, There is a SaveBoolean method |
|
|
| Report Abuse |
|
|
|
| 13 Jan 2014 08:42 PM |
| I am so lost what is the nameofsave? |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 13 Jan 2014 08:44 PM |
tbh, SaveString is my go-to to save right about anything.
Exception being ultra large numbers that I rarely encounter. |
|
|
| Report Abuse |
|
|
shonclub
|
  |
| Joined: 05 Sep 2009 |
| Total Posts: 1331 |
|
|
| 13 Jan 2014 08:45 PM |
@cnt
I know, I'm just using string as an example. |
|
|
| Report Abuse |
|
|
DataStore
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 8540 |
|
|
| 13 Jan 2014 08:45 PM |
@Club, Exactly what it says on the tin.
The name of the save. What key do you want to save the data under.
Player:SaveNumber("I'mANameOfSave", 12) |
|
|
| Report Abuse |
|
|
| |
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 13 Jan 2014 08:46 PM |
Alright, When you Load data, you have to load a name.
Btw, I mixed my method up. Player:WaitForDataReady()
Player:SaveNumber('NameOfSavePlace',PlaceOfValue.Value)
when you load,
Player:WaitForDataReady()
Player:LoadNumber'NameOfSavePlace' |
|
|
| Report Abuse |
|
|
| |
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 13 Jan 2014 08:55 PM |
WhereTheDataValueIs = Player:LoadNumber'NameOfSaveDataAndzyeah'
Replace that lline that is similar with this. |
|
|
| Report Abuse |
|
|