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 » Scripting Helpers
Home Search
 

Re: How can I use OrderedDataStore Properly?

Previous Thread :: Next Thread 
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
23 Mar 2014 03:44 PM
I want to do it on an inbuilt point/rank system :
1.Obtain data store of leaderboard points
2.Find top 3 10 people and place them on a Top 10 ranked leaderboard.
I am using the roblox wiki to help and I have this script :
===============================================================================
local ods = game:GetService("DataStoreService"):GetOrderedDataStore("HighScore")

function updateBoard(board, data)
for k,v in pairs(data) do
local pos = k
local name = v.key
local score = v.value
local nametextbox = board.SurfaceGui:FindFirstChild("Name" .. pos)
nametextbox.Text = name
local scoretextbox = board.SurfaceGui:FindFirstChild("Score" .. pos)
scoretextbox.Text = score
end
end

while true do
local pages = ods:GetSortedAsync(false, 5)
local data = pages:GetCurrentPage()
updateBoard(game.Workspace.Top5ScoreBoard, data)
if not pages.IsFinished then
pages:AdvanceToNextPageAsync()
data = pages:GetCurrentPage()
updateBoard(game.Workspace.Next5ScoreBoard, data)
end
wait(.1)
end
================================================================================
But how do I implement this on my own point value instead of a "HighScore".
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
23 Mar 2014 03:45 PM
Sorry
2.Find top 3 10 people and place them on a Top 10 ranked leaderboard.
What I meant :
2.Find top 10 people and place them on a Top 10 ranked leaderboard.
Report Abuse
Eternalfireeater is not online. Eternalfireeater
Joined: 01 May 2011
Total Posts: 10027
23 Mar 2014 03:45 PM
http://wiki.roblox.com/index.php?title=Data_store
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
23 Mar 2014 03:47 PM
I read it. I get the "MAIN" part of it but I am confused on how to implement it on my own stat. And anyways... wrong link. You mean http://wiki.roblox.com/index.php?title=Ordered_data_store
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
23 Mar 2014 03:51 PM
Bump
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
23 Mar 2014 04:00 PM
How do I implement this on my own point value instead of a "HighScore"? Answer that and ill be fine.
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
23 Mar 2014 04:02 PM
BUMP!!!!!! For the last time u.u
Report Abuse
secretidagent is not online. secretidagent
Joined: 07 Nov 2010
Total Posts: 1600
23 Mar 2014 04:05 PM
Possible change:

local ods = game:GetService("DataStoreService"):GetOrderedDataStore("HighScore")

Section:

:GetOrderedDataStore("HighScore")

to your own stat:

:GetOrderedDataStore("VALUEHERE")
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
23 Mar 2014 04:09 PM
Tried that
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
23 Mar 2014 04:12 PM
To visualize what this script is really trying to do, see its origins here : http://www.roblox.com/Ordered-Datastore-Example-place?id=147985142
The wiki's physical version of Ordered Data Store. I want this script to work for my Rank and not be accumulated by a button and an increment in points.
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
23 Mar 2014 04:14 PM
Also What I am trying to understand is how does the script even work when it is refering to :
==================================================================================
local nametextbox = board.SurfaceGui:FindFirstChild("Name" .. pos)
nametextbox.Text = name
local scoretextbox = board.SurfaceGui:FindFirstChild("Score" .. pos)
==================================================================================
Where is say board.Surface That isn't the name of the brick of the leaderboard.
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
23 Mar 2014 04:15 PM
Well I gtg Ill sleep over this and bump it in the morning if it isn't answered. Bye!
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
24 Mar 2014 11:26 AM
That isn't the last bump I will do because someone actually bothered to answered so..... BUMP!
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
24 Mar 2014 11:31 AM
All I want to know is how to implement that into a leaderboard?
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
28 Mar 2014 04:48 PM
BuMP
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
28 Mar 2014 04:55 PM
Please help.
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
28 Mar 2014 04:59 PM
Ugh guess not that many people know about data stores or ordered data stores then :/
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
28 Mar 2014 05:07 PM
Bump
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
29 Mar 2014 03:16 AM
Come on guys help me here. If you don't know then ideas??? suggestions??? I am really lost... I want to make a global leaderboard but it doesn't show anything??? what am I doing wrong?
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
29 Mar 2014 05:38 AM
Bump
Report Abuse
MarioKartAddict is not online. MarioKartAddict
Joined: 11 Nov 2009
Total Posts: 42774
29 Mar 2014 07:33 AM
I have yet to see anyone have any idea about Data Stores on this forum.
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
29 Mar 2014 03:27 PM
I actually understand them well. I understand this problem better as well so I posted a new Forum Thread for help.
Report Abuse
spyclub65 is not online. spyclub65
Joined: 14 Jan 2010
Total Posts: 22
02 Jun 2014 03:32 PM
Have you tried the "Replace" button? You should put:

Find What: HighScore
Replace With: YourValue

then click "replace all"
Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
02 Jun 2014 03:53 PM
I have no idea how to save 1 peice of data yet
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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