SA-MP Forums Archive
getarg with OnTimerEx bug? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: getarg with OnTimerEx bug? (/showthread.php?tid=101058)



getarg with OnTimerEx bug? - Bpb - 08.10.2009

tried the following code

pawn Код:
SetTimerEx("PickupDestroy", 1000, 0, "ddddd", 1314, 1, 0, 4295926, 0); // numbers are random

// ...
public PickupDestroy(...)
{
    new printout[128], arg;
    format(printout, 128, " ^ PickupDestroy() args:");
    for(new i=0, j=numargs(); i<j; i++)
    {
        arg=getarg(i);
        format(printout, 128, "%s %d", printout, arg);
        //DestroyPickup(arg);
    }
    SendClientMessageToAll(0xFFFFFFFF, printout);
    print(printout);
    return;
}
and this returns me
Код:
[18:49:09] ^ PickupDestroy() args: 138674176 0 0 0 0
Help, maybe my mistake?


Re: getarg with OnTimerEx bug? - [XST]O_x - 08.10.2009

Did you forward PickupDestroy?


Re: getarg with OnTimerEx bug? - Bpb - 08.10.2009

Of course.