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
If you have a global function that uses instance variables, either built in or user defined, CE2 colors them as if the variables were put directly in the script and not inside a function. As a result, they're all in global variable color.
Steps To Reproduce
Define a function that sets instance variables, either built in ones or your own.
Which version of GameMaker are you reporting this issue for?
IDE v2024.800.0.593 Runtime v2024.800.0.617
Which operating system(s) are you seeing the problem on?
These are best assumed to be global variables, unless the function is called from an instance, in which case the scope belongs to the instance, rather than the global scope.
These variables are now marked as "Instance Variables". This is persistent event in cases where these are globals such as the example below.
/// Script1
function test() {
wow = 1234;
}
test(); // No other calls
If this is not acceptable we can kind of intuit if a variable is global by checking the CallingContext's ParentContent to see if it's global but this still would not be a perfect solution. For now the heuristic is that instance variables are highlighted as globals if LocalContext.Type is Script and SelfContext is Global.
Description
If you have a global function that uses instance variables, either built in or user defined, CE2 colors them as if the variables were put directly in the script and not inside a function. As a result, they're all in global variable color.
Steps To Reproduce
Define a function that sets instance variables, either built in ones or your own.
Which version of GameMaker are you reporting this issue for?
IDE v2024.800.0.593 Runtime v2024.800.0.617
Which operating system(s) are you seeing the problem on?
Windows 10.0.22631.0
cba263c3-17f3-466b-bd79-9e9b75dbeee1
The text was updated successfully, but these errors were encountered: