No error in script editor for missing statement


image

System Information:
Windows 11 Pro 24H2

Beta Features:
Assistant Preview
Live Animation Creator
UIDragDetectors
Video Uploads

A private message is associated with this bug report

local success = game.R is not a “missing statement”, the statement is assigning game.R to the variable success. Luau will just treat it like you are accessing anything else, such as a boolean property. However, you will get the correct warning if you enable strict mode, where it will report that there is no member under game called R:

--!strict

local ClickDetector = script.ClickDetector

ClickDetector.MouseClick:Connect(function(playerWhoClicked: Player) 
	local success = game.R
end)

The warning does not occur in nonstrict mode (i.e. the default linting mode) because Luau cannot say for sure that R does not exist, it only truly knows that when the code is run when MouseButton1Click fires.

1 Like

Its not the issue, in your side game.R got the orange warning statement significating its missing, in my side the issue is its not displaying

Have you put --!strict at the top of your Script to enable Strict checking?

image
There and yes i did

Is the “New Luau type solver” enabled in your Beta Features?

Nope, i disabled it with an issue i solved later but this debugging error is still happening so its why i needed to report it.

image

And the object doesnt exist to in theory should be highlighted as inexistant

It seems that this warning does not function correctly with the old Solver. However, it is unlikely this will be fixed, as the eventual goal is for the New Type Solver to be promoted out of Beta Features and replace the old Solver completely.

They fixed a bug with the New Solver in the new version of Studio, try re-enabling it and see if your previous issue with it was fixed.

I disabled the feature because of stupids markdown such as this in my ‘LocalScript’ :
image

2 Likes

This should be fixed in the new type solver! Thx for reporting.