Jump to content

Problem in call Remote


AL~SaYeD

Recommended Posts

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
Link to comment
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.

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