Jump to content

Problem with callRemote and Trace


Cadu12

Recommended Posts

I made trace with php using Maxmind

  
include("mta_sdk.php"); 
  
$input = mta::getInput(); 
  
$getPlayerTraceInfo = getPlayerTrace($input); // I made the functions, so i cant post full php. 
mta::doReturn( $getPlayerTraceInfo ); 
  

returns [{"ip":"24.24.24.24","country":"United States","city":"Binghamton"}]

  
function result(sum) 
    --outputChatBox(sum["ip"]) 
    outputServerLog(sum["ip"]) 
end 
  
function InfoCityPlayer(ip) 
    callRemote("http://localhost/trace.php", result, ip) 
end 
InfoCityPlayer("24.24.24.24") 
  

returns nil

Link to comment

To clarify, doReturn expects an array as it is this array that becomes the arguments to the callback function of callRemote. Passing a dictionary/table makes no sense. Of course, the PHP code should tell you this. If someone wants to fix that and upload a new version, feel free.

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