Jump to content

callRemote()


kuba90pl

Recommended Posts

Hey!

I used this script:

Lua:

function result(sum) 
    if sum ~= "ERROR" then 
        outputChatBox(sum) 
    end 
end 
function addNumbers(number1, number2) 
    callRemote ( "http://127.0.0.1/strona/index.php", result, number1, number2 ) 
end  
addNumbers ( 123, 456 ) -- call the function 
  

index.php:

  
<?php include( "mta_sdk.php" ); 
$input = mta::getInput(); 
mta::doReturn($input[0] + $input[1]); 
?> 

and it shows me an error: "attempt to call global 'callRemote' ( a nil value) so what is wrong?

i already enabled callRemote function in acl. i use xampp to host index.php

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