배우기
엔진 클래스
OrderedDataStore
만들 수 없음
복제되지 않음

*이 콘텐츠는 AI(베타)를 사용해 번역되었으며, 오류가 있을 수 있습니다. 이 페이지를 영어로 보려면 여기를 클릭하세요.


요약
메서드
GetSortedAsync(ascending: boolean,pagesize: number,minValue: Variant,maxValue: Variant):DataStorePages
상속된 멤버
코드 샘플
주문형 데이터 저장소 기본
local DataStoreService = game:GetService("DataStoreService")
local pointsStore = DataStoreService:GetOrderedDataStore("Points")
local function printTopTenPlayers()
local isAscending = false
local pageSize = 10
local pages = pointsStore:GetSortedAsync(isAscending, pageSize)
local topTen = pages:GetCurrentPage()
-- 'topTen'에 있는 데이터는 페이지의 인덱스가 인덱스로 저장됩니다.
-- 각 항목에 대해 'data.key'는 OrderedDataStore의 키이고 'data.value'는 값입니다.
for rank, data in ipairs(topTen) do
local name = data.key
local points = data.value
print(name .. "는 #" .. rank .. "위이고 " .. points .. " 포인트를 가지고 있습니다.")
end
-- 다음 페이지를 로드할 수 있습니다...
--pages:AdvanceToNextPageAsync()
end
-- 데이터를 생성합니다.
pointsStore:SetAsync("Alex", 55)
pointsStore:SetAsync("Charley", 32)
pointsStore:SetAsync("Sydney", 68)
-- 상위 10명의 플레이어를 표시합니다.
printTopTenPlayers()

API 참조
메서드
GetSortedAsync
생성
기능: DataStore
OrderedDataStore:GetSortedAsync(
ascending:boolean, pagesize:number, minValue:Variant, maxValue:Variant
매개 변수
ascending:boolean
pagesize:number
minValue:Variant
maxValue:Variant

©2026 Roblox Corporation. Roblox 및 Roblox 로고, 'Powering Imagination'은 미국 및 기타 국가 내 당사의 등록 및 미등록 상표입니다.