How can I use printf to find errors in the script?
#4

When you are trying to run a particular function and it doesn't happen, you can always use print/prinf/sendclientmessage to the steps of the function to see which part isn't working.


An Example:
pawn Код:
//some timer:
SetTimer("DoFirstThing", 1000, true);

forward DoFirstThing();
public DoFirstThing()
{
    print("Timer works, started first thing...");
    DoSecondThing();
}

DoSecondThing()
{
    print("second thing done!");
    DoThirdThing(914);
}

DoThirdThing(value)
{
    printf("third thing done! Input Value: %i", value);
}
Reply


Messages In This Thread
How can I use printf to find errors in the script? - by grand.Theft.Otto - 25.07.2011, 04:54
Re: How can I use printf to find errors in the script? - by dowster - 25.07.2011, 05:00
Re: How can I use printf to find errors in the script? - by [HiC]TheKiller - 25.07.2011, 05:00
Re: How can I use printf to find errors in the script? - by iPLEOMAX - 25.07.2011, 05:21
Re: How can I use printf to find errors in the script? - by grand.Theft.Otto - 25.07.2011, 20:52

Forum Jump:


Users browsing this thread: 2 Guest(s)