Code Reading it: (Gets Executed on Main Form Create event)
procedure TframeuModOxide.ReaduModConfig;
begin
if FileExists(OXIDE_CONFIG) then
begin
var jdata := TdJSON.Parse(OXIDE_CONFIG);
try
// Causes access violation.....
if jdata['Options']['Modded'].AsBoolean then
cbbServerListCategory.ItemIndex := 0
else
cbbServerListCategory.ItemIndex := 1;
swtchPluginWatchers.IsChecked := jdata['Options']['PluginWatchers'].AsBoolean;
finally
jdata.Free;
end;
end;
end;
I'm unsure what I'm doing wrong however I seem to be getting a random access violation when trying to read the following file. Using Rad Studio 10.4.1
File:
Code Reading it: (Gets Executed on Main Form Create event)