Jump to content

Tes5Edit crash


Runestones

Recommended Posts

Hello everybody,

 

You can try to modify your plugins.txt file with only skyrim.esm. Just for a test, if it's ok, clean your mods part by part.

 

I have a question about tes5edit:

How i can synchronize gui and the remove(element) function script. When i use it, the app crash. Even if i remove an unreferenced record.

With a lwbMainRecord only.

 

Ok, i have try RemoveElement(GetContainer(e), e); the app don't crash but send non fatales exceptions. The app need a little time and the gui is synchro.

 

Mouais, more or less...

Edited by Tiwi1
Link to comment
Share on other sites

{
DialogTopic Cleaner
}
unit userscript;
///////////////////////////////////////////////////////////////////////////////////////////////////
function EqualMaster(e:IInterface):integer;
var
i, j: integer;
m, f: IInterface;
s, d: IInterface;
begin
Result := false;
m := GetFile(e);
f := MasterByIndex(m, (MasterCount(m) - 1));
m := RecordByFormID(f, GetLoadOrderFormID(e), false);
if Not Assigned(m) then Exit;
i := ElementCount(e);
j := ElementCount(m);
if i <> j then Exit;
for i := 0 to j - 1 do begin
s := ElementByIndex(e, i);
d := ElementByIndex(m, i);
if Name(s) <> Name(d) then Exit;
if GetEditValue(s) <> GetEditValue(d) then Exit;
end;
Result := true;
end;
///////////////////////////////////////////////////////////////////////////////////////////////////
function Process(e:IInterface):integer;
var
v, m, f: IInterface;
s: string;
i: integer;
begin
Result := 0;
if GetIsDeleted(e) = true then begin
v := GetContainer(e);
RemoveElement(v, e);
Exit;
end;
s := Signature(e);
if s = 'DIAL' then begin
// if (ElementCount(e) = 0 and EqualMaster(e) = true) then Remove(e);
Exit;
end;
if s = 'INFO' then begin
v := ElementByName(e, 'PNAM - Previous INFO');
if Assigned(v) then begin
i := GetNativeValue(v);
if i = 0 then Remove(v);
end;
if EqualMaster(e) = true then SetIsDeleted(e, true);
Exit;
end;
end;
end.

 

Edited by Tiwi1
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...