pawn-lang / YSI-Includes

Just the YSI include files, none of the extra stuff.
208 stars 106 forks source link

y_va format for sa:mp #462

Open Marian3414 opened 4 years ago

Marian3414 commented 4 years ago

Hello.

I saw this include YSI/y_va, and i wanted to ask if i use va_SendClientMessage and i will have message 'hello' that contain 5 chars it will count MAX_STRING that is 1k or it will count until 5 chars then stop but the max limit is MAX_STRING - 1k ?

tr1xy commented 4 years ago

Excuse me but w h a t?

Marian3414 commented 4 years ago

Excuse me but w h a t?

Yea mate. What YSI/y_va does ? how is helping us ?

The string count until it riches MAX_STRING or if i have only a 'hello' message it will count untill 5 then stops.

tr1xy commented 4 years ago

y_va uses YSI_MAX_STRING which is 145 or UNSAFE STRING (i.e. MySql inline util) which is 2048 cells (anything above'd cause stack/heap error on default settings)

NegativeIQ commented 3 years ago

y_va is short for YSI Variadic Arguments. And if you dont know what Variadic Arguments are, basically, they are all that possible and unknown arguments in functions (to put it simply). One example is printf function, it expects first argument to be string, and then it will accept anything you throw at it (variadic arguments).

What will you do with y_va or if you need it, its up to you and your imagination.