GMEdit icon indicating copy to clipboard operation
GMEdit copied to clipboard

Allow disabling "is not part of" warnings

Open python-b5 opened this issue 2 years ago • 1 comments

I have several objects that I create with instance_create_layer and assign variables to directly after, meaning that I get constant distracting warnings in the code within these objects that uses these variables.

Is is possible that a way to disable these warnings (while keeping all other ones) specifically?

python-b5 avatar Jun 24 '22 05:06 python-b5

The warning tells you that the variable doesn't unconditionally exist on the object.

You could:

  • Write var inst = cast instance_create_layer(...); to strip type information from the value.
  • Assign those variables in object's Create.
  • Add the variables to Variable Definitions.
  • Add /// @hint :varname or /// @hint {type} :varname to object's Create event.
  • Add /// @hint objectname:varname or /// @hint {type} objectname:varname to some script.

YellowAfterlife avatar Jun 24 '22 10:06 YellowAfterlife