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

____________________________________

. لا وَالله ، لا أُعطِيكُم بِيَدي إعطَاءَ الذَّليل ، وَلا أفِرُّ فِرارَ العَبيد

____________________________________

n-560x95_D9D9D9_FF9900_000000_000000.png
Posted

And what does it say? anything in debug?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
And what does it say? anything in debug?

No thing say in debug !!

____________________________________

. لا وَالله ، لا أُعطِيكُم بِيَدي إعطَاءَ الذَّليل ، وَلا أفِرُّ فِرارَ العَبيد

____________________________________

n-560x95_D9D9D9_FF9900_000000_000000.png
Posted

And what does callRemote return? because it may be returning "ERROR".

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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

____________________________________

. لا وَالله ، لا أُعطِيكُم بِيَدي إعطَاءَ الذَّليل ، وَلا أفِرُّ فِرارَ العَبيد

____________________________________

n-560x95_D9D9D9_FF9900_000000_000000.png
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.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

The Error is "Error : 7"!

____________________________________

. لا وَالله ، لا أُعطِيكُم بِيَدي إعطَاءَ الذَّليل ، وَلا أفِرُّ فِرارَ العَبيد

____________________________________

n-560x95_D9D9D9_FF9900_000000_000000.png
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.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Thank you very much,

> That is the problem :D

____________________________________

. لا وَالله ، لا أُعطِيكُم بِيَدي إعطَاءَ الذَّليل ، وَلا أفِرُّ فِرارَ العَبيد

____________________________________

n-560x95_D9D9D9_FF9900_000000_000000.png
Posted

You're welcome.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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