When attempting to call a function I named “LocateRequired” in a script I have created, it completely breaks Intellisense for an unknown reason.
I have reinstalled studio, and no matter what account I use the error persists. I am sure this is NOT a plugin due to this test.
I made a topic and thought after around 3h of investigation I had fixed it, but after trying to use the script the error came back.
Script (Updated to match function which causes bug):
function LocateRequired(CurrentCount,LastNum)
local SearchName = "Hallway_"..tostring(CurrentCount)..tostring(LastNum)
if LastNum ~= 0 then
SearchName = "Hallway_"..tostring(CurrentCount)
end
if DataTree[SearchName] then
return DataTree[SearchName]
else
local function Search(arg)
for idx, var in pairs(arg) do
if idx == SearchName then
return var
end
if typeof(var) == "table" and var[1] ~= nil and var[2] ~= nil then
if typeof(var[2]) == "table" then
for idx, var in pairs(var[2]) do
Search(var[2][idx])
end
else
Search(var[2])
end
end
end
end
for idx, var in pairs(DataTree) do
if typeof(var) == "table" and var[1] ~= nil and var[2] ~= nil then
local Task
Task = task.spawn(function()
local WaitReturn = Search(var[2])
if WaitReturn then
task.cancel(Task)
return WaitReturn
end
end)
else
warn("Potentially Fatal Error: DataTree stem found as nil.",var[1])
end
end
end
end
Intellisense autocomplete ceases to function.
I do not know what causes this, but it is detrimental to my development cycle at the moment. I need to have this game finished soon, and I can’t do that if the main script breaks an important feature.
Video Example of trying to use Autocomplete and Errorchecking after breaking Intellisense:
Thank you for reading my report.
Edited: Found the function in script which causes this issue.