CallLocalFunction useless
#1

Hello.


Is there any use for CallLocalFunction?
If you don't know, it's used to call public functions within your script, here's an example:
pawn Code:
public SendRandomMessage(playerid)
{
    switch(random(2))
    {
        case 0: SendClientMessage(playerid, -1, "Msg1");
        case 1: SendClientMessage(playerid, -1, "Msg2");
    }
    return 1;
}

CMD:randommessage(playerid)
{
    CallLocalFunction("SendRandomMessage", "i", playerid);
    return 1;
}
But the thing is, you can also use this:
pawn Code:
CMD:randommessage(playerid)
{
    SendRandomMessage(playerid);
    return 1;
}
We'll call this "plain" CallLocalFunction.

And using this method works for both plain and public functions, while CallLocalFunction only works for public functions.
So what's CallLocalFunction for? Is it just completely useless, or is there something it can do which the "plain" CallLocalFunction can't?
Reply


Messages In This Thread
CallLocalFunction useless - by CalvinC - 29.03.2015, 20:07
Re: CallLocalFunction useless - by CalvinC - 29.03.2015, 21:13
Re: CallLocalFunction useless - by Abagail - 29.03.2015, 23:30
Re: CallLocalFunction useless - by theYiin - 12.06.2015, 03:42

Forum Jump:


Users browsing this thread: 3 Guest(s)