Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Unknown error

AnatolyAnatoly Mod
in Bugs Posts: 891
Draw:143: reference cycle
stack traceback:
    [C]: in function 'error'
    ...F01872CADB0/ in function 'dkjson.encode'
    Draw:143: in field 'Draw'
    Main:10: in function 'draw'

I don't have a function 'error'


  • AnatolyAnatoly Mod
    edited September 2016 Posts: 891

    Here is the failing function:

    function Alert.fromHTML(str)
        local n = {}
        for a in string.gmatch(str, "<b>.-</b>") do
            a = a:gsub("<b>", "")
            a = a:gsub("</b>", "")
            n = Alert.fromHTML(a)
            table.insert(n, n)
            str = str:gsub(str, a)
        return n

    I was calling the function something like Alert.Open("Test Text <b>Test Bold</b>", "Test Alert")

    I am currently working on something and I have currently only b in the function, that's why if you ask.

  • dave1707dave1707 Mod
    Posts: 9,279

    If I comment out the Alert line it works for me. No errors and I get what I think is correct. If you have problems, then comment out lines and figure out what's wrong line by line.

  • AnatolyAnatoly Mod
    Posts: 891

    But I' will have more tags b,i, u, img, etc. and I want to redirect to the function again

  • AnatolyAnatoly Mod
    Posts: 891

    I don't know why, but Json.encoded didn't supported the returned value :/

Sign In or Register to comment.