Y_timers ptask error
#1

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.
Reply
#2

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
Reply
#3

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)
Reply
#4

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
Reply
#5

[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,
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)