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.
0
Comments
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.
this line tells you the first line of the script file that caused the error and the line number.
If you find a script where line 1 is ------------------------------------------- the error will be on line 100 of that script
@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!
----
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