我有以下代碼,Roblox 開發人員和 L??ua.org 手冊都說應該可以從表中洗掉一個實體,以便我可以將其存盤為本地,但本地只保存一個 nil 值。
桌子在那里。它顯示在列印功能上。它只是不會存盤在應用程式中有用。
我已經嘗試了此代碼的多個版本,包括僅使用對函式,僅使用 table.remove 函式,以及使用和不使用 table remove 的位置,它們都生成 nil 變數。
response = HttpService:GetAsync(mining)
data = HttpService:JSONDecode(response, Enum.HttpContentType.ApplicationJson)
local function tprint(t)
for k,v in pairs(t) do print(k,v) end
end
tprint(data)
local a = table.remove(data, 4)
local b = table.remove(data, 3)
local c = table.remove(data, 2)
local d = table.remove(data, 1)
uj5u.com熱心網友回復:
最終的解決方案如此簡單,卻又如此深刻。我現在可以使用它來將加密、銀行賬戶、信用卡以及我想要的任何其他東西直接鏈接到 Roblox 或任何其他基于 lua 的程式中。
a = (data["result"]["amount"])
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/383879.html
上一篇:用Java決議JSON多維陣列
