GameMaker-Bugs icon indicating copy to clipboard operation
GameMaker-Bugs copied to clipboard

Phantom feather error will say a variable wasn't declared in the create event when it was. Error will appear and disappear based on what event was most recently edited.

Open KormexGit opened this issue 2 years ago • 2 comments
trafficstars

Description

This particular error will appear if I edit the create event, and then disappear if I edit the step event. The error will also appear if I close GameMaker and then restart it.

Steps To Reproduce

//in Object 2 create event
dir = 0;
spd = 0;

//in Object 1
testMethod = function() {
	with instance_create_layer(x, y, "Instances", Object2) {
		dir = 5;
		spd = 5;
	}
}

//step
testMethod(); //error here, says spd and dir were not set in the create event even though they were

Making any kind of edit in the step event will make the error disappear. Going back to the create event and making any edit will make it reappear.

4a24f4cf-0f6d-4a29-b75e-7b5662b868e7

KormexGit avatar Nov 11 '23 04:11 KormexGit

This may be the same bug as #2163 , but I submitted a separate bug report since the code is slightly different and I wanted to attach another project showing this alternate version of the bug.

KormexGit avatar Nov 11 '23 04:11 KormexGit

Still present on IDE v2024.4.1.144 Runtime v2024.4.1.178 also happening with other error types (as GM1041).

Emc1923 avatar May 16 '24 11:05 Emc1923