You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Declaring a variable causes a warning to be shown if a macro is defined in place of self. This only occurs for constructors and events (ie, the create event). Note also that an error is shown for structs.
Expected Behavior
Regardless of the macro, this really shouldn't produce a warning.
Failure Information (for bugs)
Steps to Reproduce
Declare a macro to use in place of self
#macro this self
Create a new script or object, copy and paste the following:
function test_struct() constructor
{
this.test = "";
}
Note the warning that is displayed.
Context
Operating System: Windows 10 Home
Hardware: Intel i7-10710U @ 1.1GHz, 32GB RAM
Toolchain: GMS Runtime 2023.200.0.298, GMEdit Dec 24, 2022
The text was updated successfully, but these errors were encountered:
I don't know if there is a temporary solution to this that will still allow me to keep my styling. Is there a comment or something I can use to disable the warnings in a particular file? Much like feather can be disabled. If not, perhaps I should remove my macro.
Indexer (which fills out information for types) isn't aware of macros and is pretty quick & stupid in general.
Changing this requires making the indexer multi-pass (store all code, process all macros, then run through the code again, now while expanding macros), which is a huge amount of work and probably won't happen too soon.
You might hardcode a workaround by modifying this line in app.js
Current Behavior
Declaring a variable causes a warning to be shown if a macro is defined in place of
self
. This only occurs for constructors and events (ie, the create event). Note also that an error is shown for structs.Expected Behavior
Regardless of the macro, this really shouldn't produce a warning.
Failure Information (for bugs)
Steps to Reproduce
self
#macro this self
Context
The text was updated successfully, but these errors were encountered: