Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Support [Server] Problems with y_hooks

 
  • 0 Vote(s) - 0 Average
Server Problems with y_hooks
Frajola
Offline

Burgershot Member
Posts: 12
Threads: 6
Joined: Apr 2019
Reputation: 0
Location: Rio de Janeiro
#1
2021-01-31, 10:17 PM
y_hooks featuring warnings

PHP Code:
warning 200: symbol "@yH_OnVehicleDamageStatusUpdate" is truncated to 31 characters
warning 200
: symbol "@yH_OnVehicleDamageStatusUpdate" is truncated to 31 characters
warning 200
: symbol "@[email protected]" is truncated to 31 characters
warning 200
: symbol "@[email protected]" is truncated to 31 characters
warning 200
: symbol "@yH_OnPlayerEnterRaceCheckpoint" is truncated to 31 characters
warning 200
: symbol "@yH_OnPlayerEnterRaceCheckpoint" is truncated to 31 characters
warning 200
: symbol "@yH_OnPlayerClickPlayerTextDraw" is truncated to 31 characters
warning 200
: symbol "@yH_OnPlayerClickPlayerTextDraw" is truncated to 31 characters 


How to handle very large public names ?
Pinch
Offline

Burgershot Member
Posts: 391
Threads: 19
Joined: Apr 2019
Reputation: 22
Location: Belgrade, Serbia
#2
2021-01-31, 10:31 PM
Code:
// Taken from YSI (sh00k)
DEFINE_HOOK_REPLACEMENT__(Checkpoint, CP );
DEFINE_HOOK_REPLACEMENT__(Container , Cnt);
DEFINE_HOOK_REPLACEMENT__(Inventory , Inv);
DEFINE_HOOK_REPLACEMENT__(Dynamic   , Dyn);
DEFINE_HOOK_REPLACEMENT__(TextDraw  , TD );
DEFINE_HOOK_REPLACEMENT__(Update    , Upd);
DEFINE_HOOK_REPLACEMENT__(Object    , Obj);
DEFINE_HOOK_REPLACEMENT__(Command   , Cmd);
Most of the times just opening library's testing sample will tell you literally all that library offers
Using Pawn.CMD?
If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
Markski
Offline

Burgershot Clerk

Posts: 127
Threads: 6
Joined: Apr 2019
Reputation: 5
Location: La Plata, Argentina
#3
2021-02-01, 12:08 AM
You can use DEFINE_HOOK_REPLACEMENT__ to create shorter keywords and get under the 31 character limit, as stated above.

For example, setting the line DEFINE_HOOK_REPLACEMENT__(Checkpoint, CP ); somewhere by the top of your script will allow you to define the hook for OnPlayerEnterRaceCheckpoint as OnPlayerEnterRaceCP
Website
Frajola
Offline

Burgershot Member
Posts: 12
Threads: 6
Joined: Apr 2019
Reputation: 0
Location: Rio de Janeiro
#4
2021-02-01, 12:46 AM
(2021-01-31, 10:31 PM)Pinch Wrote:
Code:
// Taken from YSI (sh00k)
DEFINE_HOOK_REPLACEMENT__(Checkpoint, CP );
DEFINE_HOOK_REPLACEMENT__(Container , Cnt);
DEFINE_HOOK_REPLACEMENT__(Inventory , Inv);
DEFINE_HOOK_REPLACEMENT__(Dynamic  , Dyn);
DEFINE_HOOK_REPLACEMENT__(TextDraw  , TD );
DEFINE_HOOK_REPLACEMENT__(Update    , Upd);
DEFINE_HOOK_REPLACEMENT__(Object    , Obj);
DEFINE_HOOK_REPLACEMENT__(Command  , Cmd);
Most of the times just opening library's testing sample will tell you literally all that library offers

(2021-02-01, 12:08 AM)Markski Wrote: You can use DEFINE_HOOK_REPLACEMENT__ to create shorter keywords and get under the 31 character limit, as stated above.

For example, setting the line DEFINE_HOOK_REPLACEMENT__(Checkpoint, CP ); somewhere by the top of your script will allow you to define the hook for OnPlayerEnterRaceCheckpoint as OnPlayerEnterRaceCP

Thanks, it worked.
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode