loki79uk / FS22_UniversalAutoload

Mod for FS22. Please download latest release below.
122 stars 35 forks source link

Error: Running LUA method 'loadSharedI3DFileFinished' #180

Closed OlegPrymas closed 1 year ago

OlegPrymas commented 1 year ago

How to solve a problem with a critical error?
log.txt

loki79uk commented 1 year ago

Good question!

The line with the 'invalid pattern capture' error is: local temp = i3d_path:gsub(g_modsDirectory, "")

If you can edit the main UAL file to inlcude these lines (around line 4759), maybe we will see what is causing the error:

function UniversalAutoload.getEnvironmentNameFromPath(i3d_path)

    if i3d_path == nil then
        return
    end

-- ADD THIS LINE
    print("i3d_path:  " .. tostring(i3d_path))
--END ADD

    local customEnvironment = nil
    if i3d_path:find(g_modsDirectory) then

-- ALSO ADD THIS LINE
        print("  found in " .. tostring(g_modsDirectory))
-- END ADD

        local temp = i3d_path:gsub(g_modsDirectory, "")
        customEnvironment, _ = temp:match( "^(.-)/(.+)$" )
    else
        for i = 1, #g_dlcsDirectories do
            local dlcsDirectory = g_dlcsDirectories[i].path
            if dlcsDirectory:find(":") and i3d_path:find(dlcsDirectory) then

-- AND ADD THIS LINE JUST IN CASE
                print("  found in " .. tostring(dlcsDirectory))
-- END ADD

                local temp = i3d_path:gsub(dlcsDirectory, "")
                customEnvironment, _ = "pdlc_"..temp:match( "^(.-)/(.+)$" )
            end
        end
    end
    return customEnvironment
end
OlegPrymas commented 1 year ago

Should there be empty lines between them?

loki79uk commented 1 year ago

Empty lines don't matter, and the comments don't matter either, but comments must begin with -- so that they are ignored.

OlegPrymas commented 1 year ago

Коментарии не писал,только строки вставил.Ничего не поменялось в лог то что и было

OlegPrymas commented 1 year ago

log.txt

OlegPrymas commented 1 year ago

вот что получилось

loki79uk commented 1 year ago

I think something went wrong with adding the lines - can you try this version please: FS22_UniversalAutoload.zip

OlegPrymas commented 1 year ago

Спасибо,попробую отпишусь!

OlegPrymas commented 1 year ago

log.txt

OlegPrymas commented 1 year ago

это карта от Dajnet, PVcanyoncrossing Может дело в полетах в карте,в оригинальной игре нет ошибок

OlegPrymas commented 1 year ago

Попробуй у себя ее установить и запустить с твоим модом

loki79uk commented 1 year ago

It could be because there is a round bracket ) in your windows user name path: C:/Users/Dimonza)/Documents/My Games/FarmingSimulator2022/mods/

OlegPrymas commented 1 year ago

Ты был прав.проблема была в этом ).Спасибо за помощь!