If filtering is false, then the function itself is called and I have a logfile containing the desired output data. Seriously, I've done extensive testing and I'm absolutely positive this is the only factor. Now one may think that maybe some condition outside of the function causes it to not get called, but here's where things start to get really weird: The only trigger that decides if the function gets called is within the function. Not only that, but the whole function never gets called (at least that's what I assume because all of my debug logs located in this function never get written). The problem is that once filtering becomes true, every other condition gets straight up ignored. If not filterException and filtering then Or nf(res.action_messages,'color')='H' and filtertab Or nf(res.action_messages,'color')='M' and filtertab Or nf(res.action_messages,'color')='D' and filtertab If not filter and debugging then windower.add_to_chat(8,'Battlemod - Filter Not Recognized: '.tostring(actor.filter)) endįiltertab = (filter and filter) or filter If not actor.filter or not target.filter then filtering = true end If (string.find(message, 'Skillchain') or string.find(message, 'Magic Burst') or string.find(message, 'Treasure Hunter')) and actor.name = _player().name then If pcall(function () local testMessage = res.action_messages end) then I need to do it like this because otherwise it will sometimes throw errors Returns true (don't filter) or false (filter), booleanįunction check_filter(actor,target,category,msg) But first of all, let's look at the current, modified code (located in generic_a): - This determines whether the message should be displayed or filtered The reason why that does not work the way I hoped it would is because Lua straight up skips a condition before running through the code itself. (The reason I want to filter them separately is because I don't want the entire category of that message type to appear in my chat, only the selected messages) I am trying to modify the Battlemod addon so that it displays certain messages even if they would normally be filtered.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |