YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
26 stars 8 forks source link

[Feather] Don't warn on booleans being used in numeric operations #6695

Open gurpreetsinghmatharoo opened 4 months ago

gurpreetsinghmatharoo commented 4 months ago

Is your feature request related to a problem?

The feather error that warns about boolean operations, e.g.:

keyboard_check(vk_right) - keyboard_check(vk_left);

It feels very anti-beginner, as we show this in a lot of tutorials and is completely okay in GML as bools are just numbers.

Describe the solution you'd like

Stop showing any warning or errors when booleans are used as numbers.

Describe alternatives you've considered

No response

Additional context

No response

gnysek commented 4 months ago

as bools are just numbers

show_debug_message(is_bool(1));
show_debug_message(is_bool(true));

gives

0
1

IMO bools are numbers when they are converted to string.

Also - Feather may be right in GMRT context...

rwkay commented 4 months ago

This is not a bug in GMLv2 and it is a common idiom in GameMaker tutorials we decided not to do this.