GSE: Sequences, Variables, Macros

GSE: Sequences, Variables, Macros

8M Downloads

[BUG] Error processing a loop within a loop

leethaxdk opened this issue ยท 1 comments

commented

Describe the bug
Unable to save macro after attempting to add a loop inside a loop.

To Reproduce
Steps to reproduce the behavior:

  1. Create new macro
  2. Create Action Block (with /cast Flame Shock), create Loop Block (repeat once), create another Loop Block inside the previous Loop Block (Repeat twice, /cast lightning bolt), Create an Action Block inside the First Loop Block (/cast Lava Burst)
  3. Attempt to save

Message: Interface\AddOns\GSE\API\StringFunctions.lua:20: bad argument #1 to 'gsub' (string expected, got table)
Time: Thu Jul 1 09:50:58 2021
Count: 1
Stack: Interface\AddOns\GSE\API\StringFunctions.lua:20: bad argument #1 to 'gsub' (string expected, got table)
[string "=[C]"]: in function gsub' [string "@Interface\AddOns\GSE\API\StringFunctions.lua"]:20: in function UnEscapeString'
[string "@interface\AddOns\GSE\API\Translator.lua"]:73: in function TranslateString' [string "@Interface\AddOns\GSE\API\Storage.lua"]:1237: in function <Interface\AddOns\GSE\API\Storage.lua:1221> [string "@Interface\AddOns\GSE\API\Storage.lua"]:1304: in function <Interface\AddOns\GSE\API\Storage.lua:1297> [string "@Interface\AddOns\GSE\API\Storage.lua"]:1422: in function CompileTemplate'
[string "@interface\AddOns\GSE\API\Storage.lua"]:513: in function OOCUpdateSequence' [string "@Interface\AddOns\GSE\API\Events.lua"]:459: in function ?'
[string "@interface\AddOns\GSE\Lib\AceTimer-3.0\AceTimer-3.0.lua"]:55: in function <...terface\AddOns\GSE\Lib\AceTimer-3.0\AceTimer-3.0.lua:50>

Locals: (*temporary) =

{
1 = "/say Hello"
Type = "Action"
}
(*temporary) = "|c%x%x%x%x%x%x%x%x"
(*temporary) = ""
(*temporary) = "string expected, got table"

Desktop (please complete the following information):

  • OS: [e.g. Windows 10 64bit]
  • Game Version [e.g. classic/retail/9.0.5]

GSE Version

Additional context
Deleting the lua in WTF fixed my ability to save but upon trying this same setup i encountered it again.

(Raw text of what the macro would look like)
{
["Variables"] = {

},
["Actions"] = {
    [1] = {
        [1] = "/cast Flame Shock",
        ["Type"] = "Action"
    },
    [2] = {
        [1] = {
            [1] = {
                [1] = "/cast Lightning Bolt",
                ["Type"] = "Action"
            },
            ["Type"] = "Loop",
            ["Repeat"] = 2,
            ["StepFunction"] = "Sequential"
        },
        [2] = {
            [1] = "/cast Lava Burst",
            ["Type"] = "Action"
        },
        ["Repeat"] = "1",
        ["Type"] = "Loop",
        ["StepFunction"] = "Sequential"
    }
},
["InbuiltVariables"] = {
    
}

}

commented

Got a fix incoming now