I was getting this during combat (a LOT of it) with the current nightly MWSE:
Error in event callback: Data Files\MWSE\core\mwse_init.lua:138: bad argument #1 to 'pairs' (table expected, got nil) stack traceback: .\Data Files\MWSE\core\event.lua:147: in function <.\Data Files\MWSE\core\event.lua:146> [C]: in function 'pairs' Data Files\MWSE\core\mwse_init.lua:138: in function 'find' Data Files\MWSE\mods\Diligent Defenders\main.lua:57: in function 'inBlackList' Data Files\MWSE\mods\Diligent Defenders\main.lua:87: in function <Data Files\MWSE\mods\Diligent Defenders\main.lua:77> [C]: in function 'xpcall' .\Data Files\MWSE\core\event.lua:160: in function 'trigger' .\Data Files\MWSE\core\event.lua:180: in function <.\Data Files\MWSE\core\event.lua:150>
I looked at line 57 and it looked fine [ if (table.find(config.blackList, id) ~= nil) then ], but the variable CONFIG appears to be local (to the main scope) and I suspect might not be passed to the function. I replaced it with modConfig.config.blackList, which is not defined as a local variable; the warnings in the log are gone but I cannot say if the blacklist is working or not, lol. Never mind that, the issue is that "blackList" (capital L) is not the same as "blacklist" (no capitals). Just replace all "blackList" words with "blacklist" and it's fixed.
Additionally I suggest adding Abot's Water Life creatures to the blacklist:
I can't seem to get this mod to work. I'm using Mod Organizer 2, if that matters. Here's the MWSE log file:
Morrowind Script Extender v2.1.0 (built Nov 21 2018) hooked. Found MGE XE. Version: 0.10.1.0 MWSE Lua interface initialized. [LuaManager] ERROR: Failed to run mod initialization script: sol: runtime error: Data Files\MWSE\mods\GlowInTheDahrk\main.lua:38: attempt to call field 'loadConfig' (a nil value) stack traceback: Data Files\MWSE\mods\GlowInTheDahrk\main.lua:38: in main chunk [LuaManager] ERROR: Failed to run mod initialization script: sol: runtime error: Data Files\MWSE\mods\Diligent Defenders\main.lua:33: attempt to call field 'loadConfig' (a nil value) stack traceback: Data Files\MWSE\mods\Diligent Defenders\main.lua:33: in main chunk [Demon of Knowledge: INFO] Initialized Hermaeus Mora [nc-exit] Mod initialized with configuration: { "showMenuOnExit":true } Error in event callback: Data Files\MWSE\lua\mwse\modConfig\mod_init.lua:235: mwse.registerModConfig: A mod with the name Expeditious Exit has already been registered! stack traceback: ./Data Files/MWSE/core/event.lua:109: in function 'trigger' Data Files\MWSE\lua\mwse\modConfig\mod_init.lua:247: in function <Data Files\MWSE\lua\mwse\modConfig\mod_init.lua:244> [C]: in function 'pcall' ./Data Files/MWSE/core/event.lua:107: in function <./Data Files/MWSE/core/event.lua:97> WARNING: Use of deprecated function tes3.getGMST. Use tes3.findGMST instead. WARNING: Use of deprecated function tes3.getGMST. Use tes3.findGMST instead. [nc-exit] Saving mod configuration: { "showMenuOnExit":true } WARNING: Use of deprecated function tes3.getGMST. Use tes3.findGMST instead. WARNING: Use of deprecated function tes3.getGMST. Use tes3.findGMST instead. WARNING: Use of deprecated function tes3.getGMST. Use tes3.findGMST instead. [nc-exit] Forcing exit after confirmation!
Edit: I fixed it by running MWSE-Update, and then putting those files in MO.
Is there any way you can make a similar mod that works with NPCs who are neither companions nor guards? So they react to nearby enemies in a realistic fashion -- sort of like Fliggerty's Fleeing Fetchers, but with the following differences: the player doesn't need to fight back for a reaction to occur, and only weaker NPCs run away while stronger ones will stay and fight (unless it's against another NPC instead of a creature) until they get too low on health. Not sure how doable this is with the new MWSE, but it would be amazing.
11 comments
I was getting this during combat (a LOT of it) with the current nightly MWSE:
Error in event callback:
Data Files\MWSE\core\mwse_init.lua:138: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
.\Data Files\MWSE\core\event.lua:147: in function <.\Data Files\MWSE\core\event.lua:146>
[C]: in function 'pairs'
Data Files\MWSE\core\mwse_init.lua:138: in function 'find'
Data Files\MWSE\mods\Diligent Defenders\main.lua:57: in function 'inBlackList'
Data Files\MWSE\mods\Diligent Defenders\main.lua:87:
in function <Data Files\MWSE\mods\Diligent Defenders\main.lua:77>
[C]: in function 'xpcall'
.\Data Files\MWSE\core\event.lua:160: in function 'trigger'
.\Data Files\MWSE\core\event.lua:180: in function <.\Data Files\MWSE\core\event.lua:150>
I looked at line 57 and it looked fine [ if (table.find(config.blackList, id) ~= nil) then ], but the variable CONFIG appears to be local (to the main scope) and I suspect might not be passed to the function. I replaced it with modConfig.config.blackList, which is not defined as a local variable; the warnings in the log are gone but I cannot say if the blacklist is working or not, lol. Never mind that, the issue is that "blackList" (capital L) is not the same as "blacklist" (no capitals). Just replace all "blackList" words with "blacklist" and it's fixed.Additionally I suggest adding Abot's Water Life creatures to the blacklist:
"ab01amago","ab01amemasu","ab01angel","ab01angelshark","ab01asiaarowana","ab01ayu","ab01barramundi","ab01benizake","ab01blackbass","ab01bluegill","ab01bluemerlin","ab01bluetang","ab01bluewhale","ab01bocaccio","ab01bora","ab01browntrout","ab01chinook","ab01clownfish","ab01colossoma","ab01crab01","ab01crab02","ab01crab03","ab01crabking","ab01crabprince","ab01demekin","ab01dolphin","ab01dolphinsmall","ab01dreughancient","ab01dreughelder","ab01duck01","ab01duck01b","ab01duck06","ab01duck06b","ab01duck11","ab01duck11b","ab01duck13","ab01duck13b","ab01duck17","ab01duck17b","ab01duck23","ab01duck23b","ab01duckling02","ab01duckling02b","ab01duckling04","ab01duckling04b","ab01duckling06","ab01duckling06b","ab01duckling12","ab01duckling12b","ab01giantshark","ab01goose01","ab01goose01b","ab01guppybluegrass","ab01hariyo","ab01haze","ab01hermitcrab","ab01humpback","ab01jellyfish","ab01jellyfishbig","ab01kamuruti","ab01katuo","ab01kazika","ab01kelpbass","ab01kihada","ab01killerwhale","ab01killerwhalesmall","ab01koi","ab01koi2","ab01kumanomi","ab01kuromaguro","ab01leopardshark","ab01manatee","ab01manbou","ab01mangrovejack","ab01mantaray","ab01mantaray2","ab01medaka","ab01mezirozame","ab01namazu","ab01napoleon","ab01neontetra","ab01nizimasu","ab01northernpike","ab01octopus","ab01octopussmall","ab01oikawa","ab01osyoro","ab01oyanirami","ab01pacificcod","ab01penguin01","ab01penguin01small","ab01pinksalmon","ab01rantyu","ab01redbetta","ab01reddevil","ab01redhead","ab01redparrot","ab01sdozyou","ab01seahorse","ab01seal","ab01sealsmall","ab01seaturtle","ab01seaturtlesmall","ab01severus","ab01shark","ab01sharksucker","ab01sheephead","ab01shovelnose","ab01siamesetiger","ab01slaughterfishelder","ab01snail01","ab01snail02","ab01snail03","ab01snail04","ab01snail05","ab01spermwhale","ab01steelhead","ab01suzuki","ab01tanago","ab01trout1","ab01trout2","ab01trout3","ab01trout4","ab01trout5","ab01turquoisediscus","ab01waternetch","ab01yamame","ab01zatou","ab01gondolier","ab01gondolier2","ab01cecaelia"
Regards,
Bear in mind latest MGE XE is 0.11.6 so install that one, but that requirement alone tells you its MGE XE
Thank you for this! :D
Morrowind Script Extender v2.1.0 (built Nov 21 2018) hooked.
Found MGE XE. Version: 0.10.1.0
MWSE Lua interface initialized.
[LuaManager] ERROR: Failed to run mod initialization script:
sol: runtime error: Data Files\MWSE\mods\GlowInTheDahrk\main.lua:38: attempt to call field 'loadConfig' (a nil value)
stack traceback:
Data Files\MWSE\mods\GlowInTheDahrk\main.lua:38: in main chunk
[LuaManager] ERROR: Failed to run mod initialization script:
sol: runtime error: Data Files\MWSE\mods\Diligent Defenders\main.lua:33: attempt to call field 'loadConfig' (a nil value)
stack traceback:
Data Files\MWSE\mods\Diligent Defenders\main.lua:33: in main chunk
[Demon of Knowledge: INFO] Initialized Hermaeus Mora
[nc-exit] Mod initialized with configuration:
{
"showMenuOnExit":true
}
Error in event callback: Data Files\MWSE\lua\mwse\modConfig\mod_init.lua:235: mwse.registerModConfig: A mod with the name Expeditious Exit has already been registered!
stack traceback:
./Data Files/MWSE/core/event.lua:109: in function 'trigger'
Data Files\MWSE\lua\mwse\modConfig\mod_init.lua:247: in function <Data Files\MWSE\lua\mwse\modConfig\mod_init.lua:244>
[C]: in function 'pcall'
./Data Files/MWSE/core/event.lua:107: in function <./Data Files/MWSE/core/event.lua:97>
WARNING: Use of deprecated function tes3.getGMST. Use tes3.findGMST instead.
WARNING: Use of deprecated function tes3.getGMST. Use tes3.findGMST instead.
[nc-exit] Saving mod configuration:
{
"showMenuOnExit":true
}
WARNING: Use of deprecated function tes3.getGMST. Use tes3.findGMST instead.
WARNING: Use of deprecated function tes3.getGMST. Use tes3.findGMST instead.
WARNING: Use of deprecated function tes3.getGMST. Use tes3.findGMST instead.
[nc-exit] Forcing exit after confirmation!
Edit: I fixed it by running MWSE-Update, and then putting those files in MO.