• 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] YSI Daily Tips
#41
2021-11-17: Unsafe YSI.



YSI does a lot of checks and work at mode start to ensure many things, including:


  • All callbacks work.

  • The correct mode type is determined (FS/GM).

  • JIT and crashdetect plugins are handled well.

  • Mode information is available when asking for help in forums/discord.

  • Run-time generated code can be debugged.

  • Client types are determined.

  • Latest versions are checked.

  • Reasons for slow startup (the things just mentioned) are well documented.

  • And more...




This produces a slower startup (with good reason) and a lot of output (also with good reason, it

helps immensely with helping people).? However, some people do not like these steps and frequently

complain about them.? Previously different steps could be disabled with commands like

#define YSI_NO_OBNOXIOUS_HEADER or

#define YSI_NO_OPTIMISATION_MESSAGE, but these were poorly documented,

often missing new features that people wanted to remove, and just plastered across the top of a mode

with no thought or understanding as to why they were there in the first place (the obnoxious header

was just for fun).



So instead, I've added a new way to disable these checks and features; which involves signing a mini

"contract" in defines to state that you accept full responsibility for all errors/bugs/crashes

arising from disabling these checks.? This contract is only for people who actually know what

they're doing, and I'm not even going to put it here as a "just use this magic code" solution.? I'll

also probably randomly change it in subtle ways periodically so you need to keep it updated with YSI

changes.? Including it in a mode and releasing that will only go badly for anyone using that mode.



The change is called ENABLE_YSI_UNSAFE_STARTUP, and defining it along with its contract makes the following changes:


  • All startup messages are disabled, except for one single line to say this mode is in

  • callbackfix.amx is not loaded as a filterscript, so you need to manually ensure that OnRconCommand and OnClientCheckResponse work for your mode.

  • OnScriptInit is simplified, #define FILTERSCRIPT is again required for filterscripts.

  • y_master cloud mode is removed, you must specify one of the single-behaviour y_master modes.

  • Disable scriptfiles YSI folder checks, just assumes they are correct.

  • Ignores old (default) compiler compatibility. It might work, it might not...

  • Slow function crashdetect messages are re-enabled on startup.



Messages In This Thread
YSI Daily Tips - by Y_Less - 2021-05-01, 05:25 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-01, 05:40 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-01, 06:59 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-01, 06:59 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-01, 06:59 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-01, 07:06 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-01, 07:06 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-01, 07:06 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-01, 07:07 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-01, 07:07 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-01, 07:08 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-01, 07:08 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-01, 07:08 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-01, 07:09 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-01, 07:09 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-01, 07:09 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-01, 07:09 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-01, 07:10 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-01, 07:11 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-02, 07:44 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-03, 01:17 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-04, 08:08 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-05, 09:44 AM
RE: YSI Daily Tips - by Y_Less - 2021-05-06, 02:46 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-07, 05:13 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-08, 08:08 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-09, 10:58 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-11, 08:55 AM
RE: YSI Daily Tips - by Y_Less - 2021-05-11, 08:56 AM
RE: YSI Daily Tips - by Y_Less - 2021-05-12, 09:41 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-13, 01:20 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-14, 08:20 PM
RE: YSI Daily Tips - by Y_Less - 2021-05-16, 07:41 AM
RE: YSI Daily Tips - by Y_Less - 2021-05-16, 07:49 AM
RE: YSI Daily Tips - by Y_Less - 2021-05-19, 11:25 AM
RE: YSI Daily Tips - by Y_Less - 2021-05-19, 11:26 AM
RE: YSI Daily Tips - by Y_Less - 2021-05-19, 11:27 AM
RE: YSI Daily Tips - by Y_Less - 2021-05-20, 10:05 AM
RE: YSI Daily Tips - by Y_Less - 2021-06-01, 09:26 AM
RE: YSI Daily Tips - by Y_Less - 2021-06-25, 08:06 PM
RE: YSI Daily Tips - by Y_Less - 2021-11-17, 09:12 PM
RE: YSI Daily Tips - by Y_Less - 2021-11-19, 12:21 AM
RE: YSI Daily Tips - by Y_Less - 2022-12-30, 09:56 PM
RE: YSI Daily Tips - by Y_Less - 2023-01-02, 01:25 AM
RE: YSI Daily Tips - by Y_Less - 2023-01-03, 12:17 AM

Forum Jump: