[Pawn] [Help] Convert code written on YSI 4.x to 5.x(y_inline and y_malloc) - Printable Version + open.mp forum (https://forum.open.mp) -- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3) --- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10) --- Thread: [Pawn] [Help] Convert code written on YSI 4.x to 5.x(y_inline and y_malloc) (/showthread.php?tid=398) |
[Help] Convert code written on YSI 4.x to 5.x(y_inline and y_malloc) - MattHudson - 2019-04-20 Hi guys, i'm trying to convert this code: Code: ? ?new To YSI 5.x Inline, but i really don't know what to do or how to start... I read?y_inline_impl2.inc documentation and note "How to convert from old y_inline to new y_inline:", but i didn't understand it. Thanks for reading! RE: [Help] Convert old y_inline code to newer one - Y_Less - 2019-04-20 That doesn't look like y_inline code, that looks like you are directly manipulating internal data structures. That's not documented at all. What are you trying to do with that? Why are you modifying E_CALLBACK_DATA? RE: [Help] Convert old y_inline code to newer one - #Fede - 2019-04-20 (2019-04-20, 11:07 AM)Y_Less Wrote: That doesn't look like y_inline code, that looks like you are directly manipulating internal data structures. That's not documented at all. What are you trying to do with that? Why are you modifying E_CALLBACK_DATA? He is trying to do?this include?work with YSI 5.x RE: [Help] Convert old y_inline code to newer one - MattHudson - 2019-04-20 (2019-04-20, 11:07 AM)Y_Less Wrote: That doesn't look like y_inline code, that looks like you are directly manipulating internal data structures. That's not documented at all. What are you trying to do with that? Why are you modifying E_CALLBACK_DATA? Well... basically i'm trying to upgrade?this library?because i'm using YSI 5.x on my code. I re-write most of it based on?this?documentation of converting old to new?but i stopped on the lines i said up... Thanks for answer! [Edit] So sorry,i didn't see #Fede's answer. RE: [Help] Convert code written on YSI 4.x to 5.x(y_inline and y_malloc) - Y_Less - 2019-04-21 The documentation covers standard uses. This is a completely non-standard use, and exploits internal details. Those details have never been guaranteed to be stable and change a lot. Fortunately, rewriting that isn't too hard because the timer doesn't accept any additional parameters (i.e. it is a `SetTimer` wrapper, not a `SetTimerEx` wrapper). Something like this: PHP Code: #if defined _inline_timers_included |