JeViCo

GetServerIp() fetch.remove

Recommended Posts

Did you give your script admin rights? in order for fetchRemote to work

Share this post


Link to post

solved.

SERVER_IP = "127.0.0.1"

function getServerIp()
    return SERVER_IP
end

fetchRemote("http://checkip.dyndns.com/",
    function (response)
        if response ~= "ERROR" then
            SERVER_IP = response:match("<body>Current IP Address: (.-)</body>") or "127.0.0.1"
        end
    end
)

i used SERVER_IP variable after fetchRemote function. I used it inside of function and it solved my problem

Share this post


Link to post

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.