SRL Archive - OSR Help

WriteIni Exception Error


Main

2011-12-10 17:08:10

I am currently working on a script that heavily relies on writeini and readini

But every so often I get a error saying stuff like

Error: Exception: Unable to create file "C:\Users\Marco Chen\Dropbox\Test.txt" at line 142
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]

And I can assure there were no type mistmatched and none of the parameters were like


Writelni( '','', '','');

Its quite weird and it hurts me a lot because i have over 10k of different Id thats I have to writeini/readini


Is there a reason for those errors? or is there anything I should watch out for when using writeinis?

mastaraymond

2011-12-10 17:51:00

Try running in admin?

Besides, you should handle the exceptions the appropriate way: "try .. except"

Main

2011-12-10 17:57:56

I am admin:( But could you explain more on the try…except? :p

This happens very randomly, some times I get about 2000 successful writeini in a row and this guy pops up. and then I have to create a save point and start from there.

Harry

2011-12-10 17:58:55

You know how try/excepts work in Simba, don't you? Look at MSI's file writing if you don't. Just makes it so it doesn't stop the script if it gets a problem.

Main

2011-12-10 18:18:14

I don't but will do:P thanks!

i luffs yeww

2011-12-10 19:31:36


begin
try
WriteINI('', '', '', '');
except
Writeln('what');
end;
end.