Hooking error
#1

Hello there everybody, hope Y'all having a good day
so I faced this problem while trying to hook OnPlayerClickPlayerTextDraw
PHP код:
#if defined _ALS_OnPlayerClickPlayerTextDraw
    #undef OnPlayerClickPlayerTextDraw
#else
    #define _ALS_OnPlayerClickPlayerTextDraw
#endif
forward Hk_OnPlayerClickPlayerTextDraw(playeridplayertextid);
public 
OnPlayerClickPlayerTextDraw(playeridPlayerText:playertextid){
/*
****** etc***
*/
    
CallLocalFunction("Hk_OnPlayerClickPlayerTextDraw""id"playerid_:playertextid);
    return 
1;

I get this error each time no matter what I try to do
Код:
warning 200: symbol "_ALS_OnPlayerClickPlayerTextDra" is truncated to 31 characters
I ******d this several times, and I found ou that this problem occurs when you have a symbol more than 31 characters. This is the limit and you can't really exceed it
Код:
_ALS_OnPlayerClickPlayerTextDraw has 32 characters, the problem is from it
so is there any way I can bypass this?
I tried using y_hooks but I got the same error
Thanks in advance
Reply
#2

the callback name is too long
Reply
#3

Quote:
Originally Posted by Whatname
Посмотреть сообщение
the callback name is too long
That's just how it is
Reply
#4

Try taking the First letters, I mean instead of
Код:
_ALS_OnPlayerClickPlayerTextDraw
make it
Код:
_ALS_OPCPTD
Reply
#5

PHP код:
_ALS_OnPlayerClickPlayerTD 
Reply
#6

Quote:
Originally Posted by JasonRiggs
Посмотреть сообщение
Try taking the First letters, I mean instead of
Код:
_ALS_OnPlayerClickPlayerTextDraw
make it
Код:
_ALS_OPCPTD
thanks that seemed to work, so I take it that OPCPTD is a pre-defined abbreviation for OnPlayerClickPlayerTextDraw?
Reply
#7

Just to shorten the name instead of OnPlayerClickPlayerTextDraw, Make it OPCTD or OnPlayerClickPlayerTD to make the name shorter..
Reply
#8

It must be _ALS_OnPlayerClickPlayerTD not _ALS_OPCTD or it won't work with other code libraries because they all must use the same name.
Reply
#9

you can use _ALS_OnPlayerClickTextDraw because both text draw and player text draws are supported

also its better than OnPlayerClickPlayerTextDraw because it can handle esc button
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)