Cyberboy2000 Posted November 20, 2015 Share Posted November 20, 2015 Bug Submission:Category: GeneralPlatform: PCIssue Title: Mod loader bugIssue Description: In the mod loader there's a part that causes the game to crash if the inital modinit load fails.Nov 20 20:18:21 -- game/client/strict.lua:26: variable 'res' is not declaredstack traceback:[C] ?[C] in function 'assert'game/client/strict.lua:26 in functiongame/client/mod-manager.lua:208 in function 'mountContentModPrelocalize'game/client/mod-manager.lua:62 in function 'init'game/client/class.lua:39 in functionmain.lua:129 in main chunklocal ok, mod = pcall( dofile, initFile ) --Maybe this should be an xpcall instead of a pcall?if ok thenif mod.initStrings thenmodData.modfn = modok, res = xpcall(function()local modapi = reinclude( "mod-api" )modData.api = modapi( self, id, modData.folder, scriptsAlias )modData.modfn.initStrings( modData.api )end,function( err )log:write( "mod.initStrings ERROR: %s\n%s", tostring(err), debug.traceback() )end )elselog:write( "\tMOD-NO INITSTRINGS FUNCTION PRESENT")endend --This part should not be here--[[if ok thenlog:write( "\tMOD-INITSTRINGS OK")-- Anything here to finalize mod content?elselog:write( "\tMOD-INITSTRINGS FAILED: %s", tostring(res))end]]This way the debug traceback is destroyed making it hard to find what's not workingSteps to Reproduce: Make a mod with a faulty modinit (see above) Link to comment Share on other sites More sharing options...
Developer Jason Posted November 20, 2015 Developer Share Posted November 20, 2015 I'll look into it Cyberboy. Thanks for the heads up. Link to comment Share on other sites More sharing options...
Developer Jason Posted November 20, 2015 Developer Share Posted November 20, 2015 Res needed to be defined earlier.. fix will go out in the next patch.In the meantime, if you don't mind editing your basegame scripts.zip,you can add: local res = ""before: local ok, mod = pcall( dofile, initFile ) in the mod-manager.lua Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.