Page 1 of 1

Exporting random values in range 1-6 to txt

Posted: Tue Feb 02, 2021 12:48 pm
by vasek1192
Hi,

I am attempting to export random value in range 1-6 into txt file on desktop. I am getting File not found error message. Any idea what might be wrong here? Thanks.

Code: Select all

LoopCounter = 1;
Result = 1;
OutputFile = 'C:\Users\Vaclav.Novacek\Desktop\test.txt';


WHILE(LoopCounter <= 5);
            Result = Result + rand();
    LoopCounter = LoopCounter + 1;
END;

Output = NumberToString(Result);
AsciiOutput(OutputFile, Output);

Re: Exporting random values in range 1-6 to txt

Posted: Tue Feb 02, 2021 1:28 pm
by Wim Gielis
TI executes the process on the server, while you might be referring to the desktop on your PC. Is that the case ?

Re: Exporting random values in range 1-6 to txt

Posted: Tue Feb 02, 2021 1:31 pm
by vasek1192
Hi, thanks for the reply. I beleave so.

Re: Exporting random values in range 1-6 to txt

Posted: Tue Feb 02, 2021 1:39 pm
by Wim Gielis
Then you know the answer, the remote server does not know your own PC.

Re: Exporting random values in range 1-6 to txt

Posted: Tue Feb 02, 2021 1:45 pm
by vasek1192
Damn. Thanks for the answer.