Welcome to the Achaea Forums! Please be sure to read the Forum Rules.

Mudlet full LUA stack trace?

VallieVallie Member Posts: 180 ✭✭✭ - Distinguished
After trying to tinker with writing an aff tracker, I looked up Austere's and was playing around with it a little. I noticed however this kind of line occasionally bleeding into the main console window, and showing up consistently in the error window:

[ERROR:] object:<Confirmed Hit> function:<Trigger2833>
         <[string "-------------------------------------------..."]:100: attempt to concatenate
field '?' (a nil value)>

Is there any way to expose the full stack trace? I assume it's because I've probably butchered my profile after migrating it out of a HD that went 'asplode, and since that particular trigger doesn't have 100 lines, I have no idea where the error's originating from. I'm not too familiar with lua, but googling leads me to believe it's trying to concatenate a nil value, probably from an array that's out of bounds? And with the string being cut off with dashes, I'm guessing I might also have an entry somewhere that accidentally grabs the 'PUT YOUR LUA FUNCTION HERE' box at the top, since the dashes are the first line.

I've install/uninstalled it a few times to see if that changed behaviour (it did not), and have left it out for the time being - would be happy to re-install and test things if someone has a guess.

Comments

  • AhmetAhmet Wherever I wanna beMember Posts: 2,893 @ - Epic Achaean
    There's no way to display it form errors that have already run, as far as I know. If you know where the error is happening, you can manually display(debug.traceback()) (at least I think that's what it is off the top of my head) so it'll show you the full stack any time it runs and you can match timestamps to the error.
    Huh. Neat.
  • VallieVallie Member Posts: 180 ✭✭✭ - Distinguished
    Aww :(

    Part of the problem I had debugging it is that I don't know where that error is happening - that trigger isn't directly the source, and manually stepping through line by line to everywhere it traverses doesn't lead me anywhere with code 100 lines or longer. If the trigger is a function of the object, is there any way to see the object and thus potentially where the error's coming from? Or is there an easier way to find the error?

    Alternatively, is there a way to gag lua errors from appearing in the main Mudlet window? It doesn't appear normally - just every 8 to 10 errors or so.
  • AustereAustere TennesseeMember Posts: 1,890 @@ - Legendary Achaean
    Disabling the limb count trigger folder if you're not using it would be the quickest fix.   
  • VallieVallie Member Posts: 180 ✭✭✭ - Distinguished
    Figured it out, eventually - thanks for the tip @Jhui, that really helped what to narrow down to look for.

    @Austere - I had done that earlier on, turns out it's because I didn't take into account the possibility of having more venoms on a person than I had prepared, so it passed an empty value when trying to envenom both weapons.

    Really good experience for learning more about Mudlet and Lua, thanks all!
  • KlendathuKlendathu Eye of the StormMember Posts: 2,214 @@ - Legendary Achaean
    I generally have the first line of any script block as a comment giving the name of the script block, makes finding these kind of things a billion times easier!

    Tharos, the Announcer of Delos shouts, "It's near the end of the egghunt and I still haven't figured out how to pronounce Clean-dat-hoo."

    BannVallieJayden
  • VallieVallie Member Posts: 180 ✭✭✭ - Distinguished
    Yeah - it was a huge pain in the butt because of all the
    ----
    PUT YOUR STUFF HERE
    ---
    blocks at the top of everything, so I stripped out a number of them and titled them better like you're saying. Feels pretty obvious in retrospect, but I guess I'm just too used to being able to view a full stack and derped out.

    I think I'll start a new profile and just download a whole bunch of things people have put up just to see how different things play together, now :)
Sign In to Comment.