Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error when calling a function from an array with 1st arg empty #8569

Closed
gm-bug-reporter bot opened this issue Nov 30, 2024 · 2 comments
Closed
Assignees
Labels
crash Crashes or other major stability issues with the GameMaker IDE project This issue has a sample project attached

Comments

@gm-bug-reporter
Copy link

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

@gm-bug-reporter gm-bug-reporter bot added crash Crashes or other major stability issues with the GameMaker IDE project This issue has a sample project attached labels Nov 30, 2024
@GameDevTosh
Copy link

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.

@stuckie stuckie moved this from Triage to Backlog in Team Workload Dec 2, 2024
@rwkay
Copy link

rwkay commented Dec 4, 2024

Fixed in develop for 2024.13

@rwkay rwkay closed this as completed Dec 4, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in Team Workload Dec 4, 2024
@YYBartT YYBartT moved this from Done to Ready for QA in Team Workload Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash Crashes or other major stability issues with the GameMaker IDE project This issue has a sample project attached
Projects
Status: Ready for QA
Development

No branches or pull requests

2 participants