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
The project won't compile when a function with more than one optional argument is called from an array, with first argument empty, and providing the subsequent ones.
This one was found in the help channels, and I can confirm it. If the first argument is set as undefined it does run properly. _result = _array[0]( undefined, 2);
It's only when the first argument is left blank that it doesn't.
Description
The project won't compile when a function with more than one optional argument is called from an array, with first argument empty, and providing the subsequent ones.
Steps To Reproduce
Start a blank project.
Create a new script.
Paste the below code into the script and Run (F5)
-------- CODE -----------
var thisfunctionptr = function(_num1 = 1, _num2 = 2){
return _num1 + _num2;
}
var _array = [];
_array[0] = thisfunctionptr;
var _result = 0;
_result = _array[0]( , 2);
show_debug_message("empty 1st optional argument test: " + string(_result));
Which version of GameMaker are you reporting this issue for?
IDE v2024.8.1.171 Runtime v2024.8.1.218
Which operating system(s) are you seeing the problem on?
Windows 10.0.22631.0
3d72d002-8e7a-4728-8781-c36ac847446c
The text was updated successfully, but these errors were encountered: