SRL Archive - OSR Help

Debugging


Sk1nyNerd

2013-05-09 01:10:27

is there a tut that tells/shows people how to properly report a bug in a script? i was gonna put the process on my page but if someone doesnt have a tut i might aswell make a tut out of it :P

sorry if wrong section, didnt know where to put as i couldnt find a tut

jelknab

2013-05-09 01:49:46


if (Dosomething) then
begin
WriteLn('Doing Dosomething');
Something := something1 - something2;

Writeln('something = ' + intToStr(Something));
WriteLn(BoolTostr(something>40));
end;

The command writeln writes a string into the log.
The first writeln will have a static context, but the 2nd and 3th have variables in them on which the result depends. this i my way of debugging, i dont know a different way in imba.

Code is not checked, i wrote this in the browser.

Sk1nyNerd

2013-05-09 02:03:48

thanks but not what I meant lol. im saying is there a tut that "noobs" can read so when they get an error in the script they can properly report it to the scripters thread rather then flame and troll which doesnt solve anything

samerdl

2013-05-10 04:58:32

You can try to look at Ashman's agility script (i think thats what your looking for right?), the way he has it - is that he has a boolean for debug mode, and if players enable it, it will display all the writeln sentences under all the functions, that way people can report exactly where the script got stucked/failed/crashed

something like

DebugMode = False;

if DebugMode then
writeln('We are doing …..');

I think it should all errors where ever the script stops/fails.

Sk1nyNerd

2013-05-10 11:56:17

no, no, you guys are over complicating what im saying lol thatnks though. i went ahead and made a guide. feel free to post it on your scripts front page.

http://villavu.com/forum/showthread.php?t=102849