單元格

*此內容是使用 AI(Beta 測試版)翻譯,可能含有錯誤。若要以英文檢視此頁面,請按一下這裡

A 字串 是一個值列表。在 Roblox 引擎 API 中有許多 方法回呼 接受和返回多個值,但 API 參考說「Tuple」而不是這些值。

參數

如果 方法回呼 接受 tuple 作為參數,則會接受多個值。例如,API 參考顯示 BindableFunction:Invoke() 方法接受 "Tuple" 作為參數,因此接受多個參數。


BindableFunction:Invoke(1, true, "string", Vector3.new(0, 0, 0))

返回

如果 方法回呼 返回 tuple,則會返回多元組值。例如,API 參考顯示 Players:GetUserThumbnailAsync() 方法返回 "Tuple",因此返回多個值。第一個返回值是內容URL,第二個是boolean


local Players = game:GetService("Players")
local userId = 156 -- 建造者
local thumbType = Enum.ThumbnailType.HeadShot
local thumbSize = Enum.ThumbnailSize.Size420x420
local content, isReady = Players:GetUserThumbnailAsync(userId, thumbType, thumbSize)
print(content, isReady) -- rbxthumb://type=AvatarHeadShot&id=156&w=420&h=420 true

此頁面