Log in

View Full Version : Report from line...



Nexz
04-06-2012, 06:55 PM
Is there a way to print a script line (number) into a WriteLn or set a variable to the a line (number) where the variable was defined?

The idea:

procedure StopScript;
begin
WriteLn('Report from line: '+PrintScriptLine);
TerminateScript;
end;
(I just made up 'PrintScriptLine'.)

So it could be used for:

SetScriptLine;
if not SomeThing then
StopScript;
Or replace 'PrintScriptLine' with a variable and use:

VarReason := #line
if not SomeThing then
StopScript;
Or has anyone got a better idea?

Yago
04-06-2012, 07:19 PM
You want to read the file and print a certain line?

Nexz
04-06-2012, 07:28 PM
You want to read the file and print a certain line?
I want to have the line of the script where the error occured printed in the debug box.

Frement
04-06-2012, 07:40 PM
Something like that could be added to Simba.