when you json_stringify() a user script function you get a proper ref out of it, but when you try to json_stringify() a built in function you just get its numerical index :(
function funny_math(a = 400, b = 20) {
return a + b;
}
var booty = { thing_to_do : funny_math };
show_message(json_stringify(booty)); //shows ref
var tooty = { thing_to_do : dot_product_3d_normalized };
show_message(json_stringify(tooty)); //shows 318
the attached file shows this. its a yyz renamed to a zip so u gotta rename it yourself, hackermans style.
Description
when you json_stringify() a user script function you get a proper ref out of it, but when you try to json_stringify() a built in function you just get its numerical index :(
the attached file shows this. its a yyz renamed to a zip so u gotta rename it yourself, hackermans style.
json_bourne.zip
Expected Change
json_stringify() should return a right and good and proper ref for built in functions
Steps To Reproduce
How reliably can you recreate this issue using your steps above?
Always
Which version of GameMaker are you reporting this issue for?
2024.6.2 (Monthly)
Which platform(s) are you seeing the problem on?
Windows
Contact Us Package Attached?
Sample Project Added?