|
| 07 Mar 2012 12:50 PM |
I basically need the code that saves the Backpack! and Loads it from a GUI All I need is some of the code like player:SaveInstance that type of stuff, The rest I have done.
I have kept trying but I can't!
And It is curtail for my Rpg. Please don't take it negatively. I desperately need help! |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2012 12:51 PM |
"I basically need" You don't need it. And we don't take requests. |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2012 12:52 PM |
| And, you could get all the children of their backpack then save them as a model. :P |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2012 01:05 PM |
| >_> A wiki writer helped me before, But I lost the Post =/ |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2012 01:17 PM |
Please could you help just use some of your time to FIX this then. And I can't get an output =/ But look for obvious signs of errors =/
wait(1) Player = script.Parent.Parent.Parent.Parent.Parent Text = script.Parent.Text Button = script.Parent
function OC() Button.Text = "Loading Data" Player:WaitForDataReady() stats = Player:FindFirstChild("leaderstats") if stats then Button.Text = "Loading" c = stats:GetChildren() for i = 1,#c do wait() if c[i].className == "IntValue" then c[i].Value = Player:LoadNumber(c[i].Name) end Player.Quest1.Value = Player:LoadBoolean("Quest1") Player.Backpack = Player:LoadInstance("Backpack") end Button.Text = "Load Done" else Button.Text = "No stats" end wait(3) Button.Text = "Load" end
Button.MouseButton1Click:connect(OC)
I know that error's Well Does not work. But this one I'm not sure, I can't test it. Without saving =/
script.Parent.MouseButton1Down:connect(function(p) local Saver = script.Parent.Parent.Parent.Parent.Parent:FindFirstChild("leaderstats") if Saver ~= nil then Saver.Parent:WaitForDataReady() Saver.Parent:SaveNumber("Xp", Saver.Xp.Value) Saver.Parent:SaveNumber("Gold", Saver.Gold.Value) Saver.Parent:SaveBoolean("Qu1", Saver.Parent.Quest1.Value) Saver.Parent:SaveNumber("Level", Saver.Level.Value) local score = Saver.Parent.Backpack:GetChildren() -- Targeting the scores before the player is gone for i = 1, #score do Saver.Parent:SaveInstance("Backpack", score)
end end end)
Thanks,
Ford. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 07 Mar 2012 02:38 PM |
Bleh. just because someone is labelled a "wiki writer" doesn't mean they can code better than those whom are not.
I'd save the data using strings and having the tools/hopperbins in a model in lighting. Then, when saving, save the strings as the weapon name.
"Bro five! Wear this to let everyone know you think they deserve a high five." |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2012 02:44 PM |
| Can you do the code for me, I'm in a cast, Its not easy to code =/ |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2012 02:58 PM |
@nate: those who* are not
@tehepicford: In the script you posted, you're saving each of the items in the backpack as "Backpack". Every time you save a value to the index "Backpack", it overwrites the one that is already there. You either need to save just one instance (model with all the stuff in it?), or you need to find a different way to save the things.
also, i r wiki writer :D |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2012 03:05 PM |
| Oh, also, you can't say `Player.Backpack = stuff`. It just doesn't work like that. |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 07 Mar 2012 03:18 PM |
Sorry grammar freak that I was writing something else then decided to erase what I had written and write something else, not noticing my error. Oh the sorrow! Please, please forgive!
"Bro five! Wear this to let everyone know you think they deserve a high five." |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2012 03:27 PM |
| Can you just help! Its hard to type with my arm D= |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
|
| 07 Mar 2012 04:24 PM |
| It would be great if you stopped BUMPING AND SPAMMING so us other players can get help. |
|
|
| Report Abuse |
|
|
|
| 07 Mar 2012 04:34 PM |
| I need help on it getting fixed Moron! |
|
|
| Report Abuse |
|
|
| |
|
adark
|
  |
| Joined: 13 Jan 2008 |
| Total Posts: 6412 |
|
|
| 07 Mar 2012 04:50 PM |
Seeing as you are typing with impeccible spelling, if not grammar, it can be assumed that, even if you have a cast, it does not get in the way of your typing.
We will not write a script for you, but if you post one we will do what we can to fix it. That includes spelling and context errors.
Don't make the excuse that you can't type code because of a cast when it is obvious that you are not impaired. |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 07 Mar 2012 04:52 PM |
| Long time no see SH...Soz for trollin... |
|
|
| Report Abuse |
|
|