SA-MP Forums Archive
Y_timers ptask error - 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)
+--- Thread: Y_timers ptask error (/showthread.php?tid=637469)



Y_timers ptask error - mirou123 - 15.07.2017

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.


Re: Y_timers ptask error - rt-2 - 15.08.2017

Quote:
Originally Posted by mirou123
Посмотреть сообщение
I just found where I fucked up and I fixed it. Thanks for your time everyone.
HOW? I got this problem atm lol


Re: Y_timers ptask error - IstuntmanI - 15.08.2017

Quote:
Originally Posted by rt-2
Посмотреть сообщение
HOW? I got this problem atm lol
He said this:
Quote:

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)


Re: Y_timers ptask error - rt-2 - 17.08.2017

Quote:
Originally Posted by IstuntmanI
Посмотреть сообщение
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


Re: Y_timers ptask error - rt-2 - 17.08.2017

[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-Includ...ment-323112939).
So the syntax is correct as written in the examples.
Thank you,