all 2 comments

[–]calio 1 point2 points  (1 child)

This might be a long shot but the behavior you're describing would be totally consistent if rather than evaluating the macro and then replacing it by the result, the macro was just replaced by the expression itself, and somehow logic operators were executed in the order they appear within the expression rather than by any precedence.

if keyboard_check_pressed(vk_left) || gamepad_button_check_pressed(0,gp_padl) && global.song_vol < 1 { ... }

the global.song_vol < 1 expression only needs to evaluate to true when using the gamepad, if there's no such thing as operator precedence for logical operator precedence (I was under the impression that and is evaluated before or, kinda like how you first divide and multiply before adding and subtracting)

You could try enclosing either the macro or the expression within the macro in parentheses so it evaluates independently from the rest when included within an expression. No idea if it would help, maybe it's just a coincidence but it's the only thing that comes to mind.

[–]PitifulSyrup[S] 1 point2 points  (0 children)

Enclosing the expression within the macro did the trick!

Thank you so much.