CallLocalFunction and Calling functions directly
#1

What's the differences between CallLocalFunction and Calling a function via pawn?

I mean this:
pawn Код:
forward asd(dsa);
public asd(dsa){
    SendClientMessage(dsa, 0xFF0000FF, "-----========== [| A S D |] ==========---------");
    return 1;
}
//with CallLocalFunction
public OnPlayerConnect(playerid){
    CallLocalFunction("asd", "i", playerid);
    return 1;
}
//normal way
public OnPlayerConnect(playerid){
    asd(playerid);
    return 1;
}
Reply
#2

The difference is that it won't give you errors if the public doesn't exist. It can be used in command generators because the function name can be adapted to the situation easier.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)