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
 

Error 404

Previous Thread :: Next Thread 
snoppyploptart is not online. snoppyploptart
Joined: 28 Jun 2012
Total Posts: 36
24 Jul 2016 11:04 PM
Hello,
I am trying to create a datastore for my game and I keep getting error 404 when playing the game (I am using an output gui in-game). Pictures below, maybe.
Thanks!

http://share.pho.to/AENyv
Report Abuse
snoppyploptart is not online. snoppyploptart
Joined: 28 Jun 2012
Total Posts: 36
24 Jul 2016 11:07 PM
Please delete. Just checked rules that said you cant have links.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
24 Jul 2016 11:09 PM
Posts can't be deleted. Roblox's forum software is from ~2004 and their forum software has never been updated, ever.

It looks to me like that is an error for Data Persistence because it appears to be specific to the place and to the user, DataStores don't do that. If you are truly using DataStores, that shouldn't happen. Are you using WaitForDataReady by any chance? Because that shouldn't be used with DataStores.


Report Abuse
snoppyploptart is not online. snoppyploptart
Joined: 28 Jun 2012
Total Posts: 36
24 Jul 2016 11:23 PM
No Here is the the code for the datastore below. (I am new to datastores so I went off of a tutorial with some changes). I also changed the leader.Name to "leaderstats" from "statStorage" because I couldn't see the Credit Number. I wanted it to be privately displayed on a Gui (which is done), but I will have to change "leaderstats" back to "statStorage". Could the name change be the reason why, and if so, would changing the datastore name fix it(creating a new one)? Thanks!

~~~
local DataStore = game:GetService("DataStoreService")
local ds1 = DataStore:GetDataStore("TrustCurrency")
print("step1")

game.Players.PlayerAdded:connect(function(player)
local leader = Instance.new("Folder",player)
leader.Name = "leaderstats"
print("step2")
local Credits = Instance.new("IntValue",leader)
Credits.Name = "Credits"
print("step3")
Credits.Value = ds1:GetAsync(player.userId) or 100
ds1:SetAsync(player.userId,Credits.Value)
print("step4")
wait(.2)
print("Initial Load Complete")

Credits.Changed:connect(function()
print("Saving Data")
ds1:SetAsync(player.userId,Credits.Value)
print("Saved "..player.userId.."'s Credit Balance of "..Credits.Value)
end)
end)

--Test Section--

--Used to test for data saving and such--

local creditpool = game.Workspace.creditpole

creditpool.Touched:connect(function(player)
local stat = player.leader.Credits
stat.Value = stat.Value + 5
print("5 Credits Added")
end
end)


--End Test Section--

local DataStore = game:GetService("DataStoreService")
local ds1 = DataStore:GetDataStore("TrustCurrency")


game.Players.PlayerRemoving:connect(function(player)
ds1:SetAsync(player.userId,player.leaderstats.Credits.Value)
print("Saved "..player.userId.."'s Credit Balance of "..player.StatStorage.Credits.Value)
end)



game.OnClose = function()
print("Closing")
wait(15)
print("Closed")
wait(1)
end
~~~
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