PDA

View Full Version : Y_timers ptask error


mirou123
15/07/2017, 08:24 AM
So the problem is pretty straight forward
ptask Task_Name[DELAY](playerid)
{
}
gives me this error "array sizes do not match, or destination array is too small"
I got it to work by redefining MAX_PLAYERS to 100. Anything other than 100 gives that error. So how can I fix this?

EDIT: I just found where I fucked up and I fixed it. Thanks for your time everyone.

rt-2
15/08/2017, 02:21 AM
I just found where I fucked up and I fixed it. Thanks for your time everyone.

HOW? I got this problem atm lol

IstuntmanI
15/08/2017, 02:29 PM
HOW? I got this problem atm lol

He said this:
I got it to work by redefining MAX_PLAYERS to 100. Anything other than 100 gives that error. So how can I fix this?

Probably he redefined the MAX_PLAYERS definition after including y_timers, while it should be redefined directly after including a_samp, before including y_timers. (I'm not sure about this, but this is what my logic says, I never worked with y_timers)

rt-2
17/08/2017, 04:31 PM
He said this:


Probably he redefined the MAX_PLAYERS definition after including y_timers, while it should be redefined directly after including a_samp, before including y_timers. (I'm not sure about this, but this is what my logic says, I never worked with y_timers)

Thanks for your help, In my case, MAX_PLAYERS is redefined after a_samp and before y_timers.
But he said after that he knew where he fucked up, probably this is not the correct syntax maybe, but there is no documentation for ptask....
I posted an issue here: https://github.com/Misiur/YSI-Includes/issues/198
Thank you,
rt-2

rt-2
17/08/2017, 08:17 PM
[Solved]
I don't understand why but MAX_PLAYERS have to be redefined before y_timer and after a_samp.
In my case, the filterscript I was testing with was wrongly configured so I was testing wrong.
IstuntmanI 'proved' me that (see: https://github.com/Misiur/YSI-Includes/issues/198#issuecomment-323112939).
So the syntax is correct as written in the examples.
Thank you,