小编Dya*_*ler的帖子

Lua 5.0 - 即使值不同,对表的迭代也会忽略重复键

阅读代码片段中注入的注释应该提供足够的上下文.

   --| Table |--
    QuestData = {
        ["QuestName"]={
            ["Quest Descrip"]={8,1686192712},
            ["Quest Descrip"]={32,1686193248},
            ["Quest Descrip"]={0,2965579272},
        },
    }


--| Code Snippet |--
--| gets QuestName then does below |--

    if QuestName then
        -- (K = QuestName) and (V = the 3 entries below it in the table)
        for k,v in pairs(QuestData) do
            -- Checks to make sure the external function that obtained the QuestName matches what is in the table before cont
            if strlower(k) == strlower(QuestName) then
                local index = 0
                -- …
Run Code Online (Sandbox Code Playgroud)

lua

2
推荐指数
1
解决办法
507
查看次数

标签 统计

lua ×1