#TypeChecker bug or am I doing something wrong?
1 messages · Page 1 of 1 (latest)
Maybe report it like it says 😱
I already did that but im searching for a solution or maybe im doing something wrong
Is any of the scripts that is dataapi having type errors
no
The collect data method looks Wierd
Ig this but this is likely to be also a bug
I usually ignore those
function API.save(player)
if not API.dataTree.DataStoreName then return end
local ds = DataStoreService:GetDataStore(API.dataTree.DataStoreName)
local saveData = API.logic.collectSaveData(player)
local success, err = pcall(function()
ds:SetAsync(player.UserId, saveData)
end)
if not success then
warn("Save failed for", player.Name, err)
end
end
I mean this looks fine to me
function API.collectSaveData(player)
local saveData = {}
for _, child in player:GetChildren() do
local folderDef = API.getFolderDefinitionByName(child.Name)
if not folderDef then continue end
local valuesToSave = API.getValuesToSave(child, folderDef)
if not valuesToSave then continue end
for key, value in valuesToSave do
saveData[key] = value
end
end
return saveData
end
the collectSaveData() also isnt doing something insane
I simplified the bug on a much easier script and the bug only exists with --!strict bru
which for example
First of all
No type checking
Second of all
Silent Errors
Third of all
Risk of memory corruption
Fourth of all
wdym by no type checking, isnt --!strict stricter type checking?
do you have an example of Silent Errors?
I think my old man said cons of --!nonstrict
lmao
mb then
but why --!strict on everything bro
is it necessary
yes
i mean your automaticly producing less bugs ig
enabled --!strict for the first time..
yeah you need to build a script from ground up if you use —!strict