CallRemoteFunction with reference variable
#1

CallRemoteFunction with reference variable

Hello,
I interested, is there any way to CallRemoteFunction with reference variable?

Thanks,
RaFaeL.
Reply
#2

pawn Код:
public OnGameModeInit()
{
CallRemoteFunction("Function", "sd","Swimor you should checkout the wiki", "123");
return 1;
}
public Function(const string[], number)
{
printf("We have a message: %s", string)
printf("And also we have a number: %d", number);
return 1;
}
https://sampwiki.blast.hk/wiki/CallRemoteFunction
Reply
#3

You can't use a reference variable since the remote function dont share the same memory block
Therefore the remote function cant modify the memory of the caller

But it should work with local functions and CallLocalFunctions

(Thats what I am thinking, cant prove that)

I think that there is some code in YSI which allows something like that
But that mostly works over properties or any other code which isnt limited to the script
Reply
#4

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
You can't use a reference variable since the remote function dont share the same memory block
Therefore the remote function cant modify the memory of the caller

But it should work with local functions and CallLocalFunctions

(Thats what I am thinking, cant prove that)

I think that there is some code in YSI which allows something like that
But that mostly works over properties or any other code which isnt limited to the script
Thanks, Great answer!
I found Slice's fixed CallLocalFunction here:
http://forum.sa-mp.com/showpost.php?...postcount=2950
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)