Jump to content

LUA ERROR mod screen error


Recommended Posts

Hey guys ;)

I've installed few mods (namely sort inventory, combined stats, minimap hud, geometric placement, display food values [unused], wormhole marks [unused]), played SW yesterday 'til I died and quit the game. When I started the game today and clicked on the MOD button it tried to load the mods, but failed with the following error message (screen shot). I tried several things - including changing to 3 different pcs, deleting the mods, modscreen file, de- and reinstall... Can anybody help me please? :?

 

The lines the error is referring to are the following ones: 

(175-210)
function ModsScreen:OnStatsQueried( result, isSuccessful, resultCode )    

    if TheFrontEnd.screenstack[#TheFrontEnd.screenstack] ~= self then
        return
    end

    if not result or not isSuccessful or string.len(result) <= 1 then return end

    local status, jsonresult = pcall( function() return json.decode(result) end )

    if not jsonresult or not status then return end

    local randomPicks = self:GenerateRandomPicks(#self.modlinks, 20)

    for i = 1, #self.modlinks do
        local title = jsonresult["modnames"][randomPicks]
        if title then 
            local url = jsonresult["modlinks"][title]
            title = string.gsub(title, "(ws%-)", "")
            if string.len(title) > 25 then
                title = string.sub(title, 0, 25).."..."
            end
            self.modlinks:SetText(title)
            if url then
                self.modlinks:SetOnClick(function() VisitURL(url) end)
            end
        end
    end

    local title, url = next(jsonresult["modfeature"])
    if title and url then
        title = string.gsub(title, "(ws%-)", "")
        self.featuredbutton:SetText(title)
        self.featuredbutton:SetOnClick(function() VisitURL(url) end)
    end
end

(401-404)
--Now update the top mods
    local linkpref = (PLATFORM == "WIN32_STEAM" and "external") or "klei"
    TheSim:QueryStats( '{ "req":"modrank", "field":"Session.Loads.Mods.list", "fieldop":"unwind", "linkpref":"'..linkpref..'", "limit": 20}', 
        function(result, isSuccessful, resultCode) self:OnStatsQueried(result, isSuccessful, resultCode) end)

Screen_DS_SW_mod_screen_error.jpg

Link to comment
Share on other sites

Here is a simple way to get the mod enabled.
This bug may be an error of MODs online verification.

The way is entering the MODs and carefully waiting for the online verification to complete, once it is done disconnect from internet imediately, then the LUA error won't appear and you can enable any mods offline as you wish.

If you want to adjust the mod,this is the only way for now.

You can also subscibe this mod "A_ModsScreen_HotFix", and do as mentioned above again just for once.Then you can enter the MODs without error.

Remmeber the key is subscribing the mods online and enable them offline.

 

Link to comment
Share on other sites

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.

×
×
  • Create New...