print what call this funcion
#1

Is it possible to print what callback call funcion?

exemple:

pawn Код:
stock funcion(playerid)
{

print("Called by WHAT??");
//printout : Called by OnPlayerUpdate

}

public OnPlayerUpdate(playerid)
{
funcion(playerid);
return 1;
}
Reply
#2

It is possible like this:
pawn Код:
public OnPlayerUpdate(playerid)
{
    print("OnPlayerUpdate");
    return 1;
}

public OnPlayerUpdate(playerid)
{
    print("OnPlayerConnect");
    return 1;
}

//etc... etc...
Reply
#3

If you have CrashDetect you can do something like this:

pawn Код:
stock function(playerid) {
    // Run time error 1: "Forced exit"
    #emit halt 1
}
and you'll see the caller in the AMX backtrace
Reply
#4

You must spread some Reputation around before giving it to ****** again.
xeeZ Rep +
[MG]Dimi +

Thank you for helped me to solve this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)