YSI-Includes icon indicating copy to clipboard operation
YSI-Includes copied to clipboard

[y_hooks] hook macro doesn't work with spaces between function name and arguments

Open kristoisberg opened this issue 5 years ago • 5 comments

hook OnPlayerConnect (playerid)

C:\Users\Kristo Isberg\Documents\Tech_Lights\Tech_Lights.inc:177 (error) expected token: "(", but found "-identifier-"
C:\Users\Kristo Isberg\Documents\Tech_Lights\Tech_Lights.inc:177 (error) expected token: ";", but found "("

kristoisberg avatar Aug 30 '18 19:08 kristoisberg

4.x or 5.x?

Misiur avatar Aug 30 '18 20:08 Misiur

Apparently both.

Y-Less avatar Aug 30 '18 20:08 Y-Less

Both indeed. Preprocessor output (5.x):

forward @yH_OnPlayerConnect @003(playerid);@yH_OnPlayerConnect @003(playerid)

kristoisberg avatar Aug 30 '18 20:08 kristoisberg

Ahh yes, of course that's why! That's helpful.

Y-Less avatar Aug 30 '18 20:08 Y-Less

OK, I'm a bit stumped actually, the idea I had didn't work, so I need to think some more.

Y-Less avatar Aug 30 '18 20:08 Y-Less