SRL Archive - General Botting Help

Restarting Simba


mobb

2014-10-12 11:18:07

is there a way to restart simba every hour or so without doing it manually
for some reason my script messes up after around 3 hours and by restarting it it works fine

basically
have a timer and when it reaches one hour, restart the script… unless there is a easier way

this is for rs3

Clarity

2014-10-12 11:21:32

From: mobb
is there a way to restart simba every hour or so without doing it manually
for some reason my script messes up after around 3 hours and by restarting it it works fine

basically
have a timer and when it reaches one hour, restart the script… unless there is a easier way

this is for rs3

How does it mess up? Wouldn't it be preferable to fix that error so you can run your script forever?

Hoodz

2014-10-12 11:23:47

From: mobb
is there a way to restart simba every hour or so without doing it manually
for some reason my script messes up after around 3 hours and by restarting it it works fine

basically
have a timer and when it reaches one hour, restart the script… unless there is a easier way

this is for rs3


are you loading/ not freeing items such as bitmaps/dtms?

mobb

2014-10-12 11:35:12

How does it mess up? Wouldn't it be preferable to fix that error so you can run your script forever?


i have no idea where the error in the script is so that's why im resorting to this option
sometimes when i sleep and come back to check or just afk and come to check it would be just stuck in lobby or SMART wouldn't even be on

mobb

2014-10-12 11:36:55

From: hoodz
are you loading/ not freeing items such as bitmaps/dtms?


actually last night the script stopped once because DTM Minimap or something along those lines wasn't freed
it said attempting to free.. but the bot just stood there and didnt move even after like 5 min

Clarity

2014-10-12 11:49:03

From: mobb
actually last night the script stopped once because DTM Minimap or something along those lines wasn't freed
it said attempting to free.. but the bot just stood there and didnt move even after like 5 min

I think it would be much more helpful to you to copy and paste the full debug log up until script termination. Is this a private script of yours? If so, you should insert debug lines at key points in the script to find out exactly what is going on.

Often times as scripters we are tempted to patch errors with alternate fixes (although tbh I believe you can only pause a script from within and resume it?) but it's usually more beneficial to fix the core problem.


What hoodz is talking about (I believe) is that if you are not freeing memory after using DTMs and Bitmaps, overtime this causes a buildup and a stop may occur like the one you're experiencing.

e.g.


procedure usingSomeDTM;
var
myDTM: integer;
begin
myDTM := DTMFromString('skjdhgasdfkjhagdfkjahdgfakjsdhfg');
{...}
//usage of the DTM here
{...}
freeDTM(myDTM); //freeing of the memory used by the DTM
end;

I think you could theoretically code an extension to do what you want but this is a lot of unnecessary work as opposed to fixing the original error.

mobb

2014-10-12 12:36:38

From: Clarity
I think it would be much more helpful to you to copy and paste the full debug log up until script termination. Is this a private script of yours? If so, you should insert debug lines at key points in the script to find out exactly what is going on.

Often times as scripters we are tempted to patch errors with alternate fixes (although tbh I believe you can only pause a script from within and resume it?) but it's usually more beneficial to fix the core problem.


What hoodz is talking about (I believe) is that if you are not freeing memory after using DTMs and Bitmaps, overtime this causes a buildup and a stop may occur like the one you're experiencing.

e.g.


procedure usingSomeDTM;
var
myDTM: integer;
begin
myDTM := DTMFromString('skjdhgasdfkjhagdfkjahdgfakjsdhfg');
{...}
//usage of the DTM here
{...}
freeDTM(myDTM); //freeing of the memory used by the DTM
end;

I think you could theoretically code an extension to do what you want but this is a lot of unnecessary work as opposed to fixing the original error.


this is weird because i don't see a "DTM" in the script. btw this is somebody else's incomplete script i'm just fixing it up

TomTuff

2014-10-12 12:49:23

Was it an error in a function from SRL?

mobb

2014-10-12 13:07:28

From: TomTuff
Was it an error in a function from SRL?


sorry i didn't notice if it was. If i was to guess i wouldnt think so because there was no DTM in the script as far as i know

btw here's the code if it helps.. http://pastebin.com/Bj0SGxeC

Hoodz

2014-10-12 13:22:23

From: mobb
sorry i didn't notice if it was. If i was to guess i wouldnt think so because there was no DTM in the script as far as i know

btw here's the code if it helps.. http://pastebin.com/Bj0SGxeC


i checked the script really fast but i couldn't find something that will cause so much lagg.

mobb

2014-10-12 13:30:24

From: hoodz
i checked the script really fast but i couldn't find something that will cause so much lagg.


same. that's why i want to internally stop and restart the script because i have no idea what's wrong with it and why it stops after like 3 hours

mobb

2014-10-18 15:21:32

From: Clarity
I think it would be much more helpful to you to copy and paste the full debug log up until script termination. Is this a private script of yours? If so, you should insert debug lines at key points in the script to find out exactly what is going on.

Often times as scripters we are tempted to patch errors with alternate fixes (although tbh I believe you can only pause a script from within and resume it?) but it's usually more beneficial to fix the core problem.


What hoodz is talking about (I believe) is that if you are not freeing memory after using DTMs and Bitmaps, overtime this causes a buildup and a stop may occur like the one you're experiencing.

e.g.


procedure usingSomeDTM;
var
myDTM: integer;
begin
myDTM := DTMFromString('skjdhgasdfkjhagdfkjahdgfakjsdhfg');
{...}
//usage of the DTM here
{...}
freeDTM(myDTM); //freeing of the memory used by the DTM
end;

I think you could theoretically code an extension to do what you want but this is a lot of unnecessary work as opposed to fixing the original error.


The following bitmaps were not freed: [Minimap Mask]
File[C:\Simba\Includes\SRL-6/logs/SRL log (18-10-14 at 03.18.01 PM).txt] has not been freed in the script, freeing it now.
found the error

Clarity

2014-10-18 15:30:43

From: mobb
The following bitmaps were not freed: [Minimap Mask]
File[C:\Simba\Includes\SRL-6/logs/SRL log (18-10-14 at 03.18.01 PM).txt] has not been freed in the script, freeing it now.
found the error

That's not really an error that comes from your script. That happens typically when abrupt termination occurs.