Jump to content

Please Help me :c


Lovin.mta

Recommended Posts

I have an mta server, and I have a problem that makes the application close to the players, please help me, the problem is:

 ERROR: PanelMods/server/sUpdater.lua:15: attempt to concatenate local 'version' (a nil value)

I look at sUpdater.lua and i don´t see a problem, if you can, please help me. 

sUpdater.lua:

Updater = { }

function Updater.Notify ( msg )
    outputDebugString ( msg );
end 

function Updater.Check  ( )
    Updater.Notify ( "Checking for Mod Downloader updates ");
    local called = callRemote("https://community.multitheftauto.com/mta/resources.php", function(_, version) 
        if ( md5 ( tostring ( version ) ) ~= md5 ( getResourceInfo ( getThisResource(), "version" ) ) ) then 
            Updater.Notify ( "====================================" );
            Updater.Notify ( "= ModDownloader version doesn't match community" );
            Updater.Notify ( "====================================" );
            Updater.Notify ( "= Your version: ".. getResourceInfo ( getThisResource(), "version" ) )
            Updater.Notify ( "= Current version: ".. version )
            Updater.Notify ( "= View https://forum.multitheftauto.com/viewtopic.php?f=108&t=86587" );
            Updater.Notify ( "====================================" ); 
        end 
    end, "version", "moddownloader" )
    
    if not called then
        outputDebugString ( "FAILED TO CHECK VERSION UPDATE! PLEASE ALLOW ".. getResourceName(getThisResource()) .." ACCESS TO function.callRemote", 1 );
    end
end

Updater.Check ( );
setTimer ( Updater.Check, 1000000, 0 );

Link to comment

Hello Lovin.mta,

I think that the error may be in the following line, the specification of the callback to fetchRemote.

    local called = callRemote("https://community.multitheftauto.com/mta/resources.php", function(_, version) 

Please compare your understanding with the wiki documentation and try again.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...