Jump to content

Problem in call Remote


AL~SaYeD

Recommended Posts

Posted (edited)

Hello,

I have problem in callRemote

The problem is can't call the server by this cod

-- Sender :

meta.xml ~>

    

Server.Lua ~>

resourceName = "Test-Server" 
functionName = "outputChatBoxTest" 
IP = "***.***.***.***:****" 
  
addCommandHandler ( "send", function ( p ) 
callRemote ( IP, resourceName, functionName, function ( v ) if v ~= "ERROR" then outputChatBox ( v ); end end, getPlayerName ( p ), getPlayerSerial ( p ), "Test", getServerName (  ) ); 
end 
); 

ACL.xml ~>

    "autoGroup_Tesst-Client"> 
        "autoACL_Test-Client">
        "resource.Test-Client"> 
    
    "autoACL_Test-Client"> 
        "function.callRemote" access="true" who="" pending="false" date="14-04-05 04:07:19">
    

-- Receives : (the server that we want to connect it)

meta.xml ~>

    

Server.Lua ~>

outputChatBoxTest = function ( playerName, playerSerial, message, serverName ) 
outputChatBox ( "From" .. playerName .. "/" .. playerSerial .. "on" .. serverName .. ":" .. message, root, 255, 0, 0, true ); 
outputServerLog ( "From" .. playerName .. "/" .. playerSerial .. "on" .. serverName .. ":" .. message ); 
return "DONE!" 
end 

ACL.xml ~>

"autoGroup_Test-Server"> 
        "autoACL_Test-Server">
        "resource.Test-Server"> 
        "user.http_guest"> 
    
    "autoACL_Test-Server"> 
        "resource.Test-Server.http" access="true" who="" pending="false" date="14-04-05 03:54:14">
    

NOTE : I was given permission for meta.xml AND acl.xml

Sorry for bad Language

Thx

Edited by Guest
Posted (edited)
And what does callRemote return? because it may be returning "ERROR".

It's returning ERROR and don't do anything from code!

Supposed is return Done!

Edited by Guest
Posted
resourceName = "Test-Server" 
functionName = "outputChatBoxTest" 
IP = "***.***.***.***:****" 
  
addCommandHandler ( "send", 
    function ( p ) 
        callRemote ( IP, resourceName, functionName, callbackFunction, getPlayerName ( p ), getPlayerSerial ( p ), "Test", getServerName (  ) ) 
    end 
) 
  
function callbackFunction ( v, msg ) 
    if ( v ~= "ERROR" ) then 
        outputChatBox ( v ) 
    else 
        outputChatBox ( "ERROR: ".. tostring ( msg ) ) 
    end 
end 

Use that and see what error it outputs.

Posted

That error means this:

"Failed to connect() to host or proxy."

Maybe the IP/port is wrong, remember that you must use the HTTP port, not the actual server port.

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...