HuubGitHub / dwscript

Automatically exported from code.google.com/p/dwscript
1 stars 0 forks source link

Unable to compile script upon first time use (reading introduction) #304

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have just installed DWS 2.3 in Delphi XE2 for use in a VCL Forms Application. 
This is my first time using it, so I followed the simple beginners tutorial for 
"Hello World" and when I run it, I get an error "Script compiled with errors. 
Can't execute!". My exact command line as stated in the tutorial is as follows:

PrintLn('Hello World');

On a side note, when any type of exception is raised within the DWS 
components/libraries, it should raise an exception all the way through. In 
other words, when in Debug mode, I should get an IDE exception message first, 
so that I can handle it accordingly. First of all, it's annoying when a 
third-party message dialog is shown; second of all, I can't override them (as 
far as I know) to hide them from the user (I like keeping a log of messages), 
and third of all, I would have a breakpoint in debug to allow me to identify 
what went wrong.

At least that's what I would expect, I don't know yet how extensive DWS is, 
I've just started with it. I'm just using it to implement a drawing script 
which replicates the "TCanvas" to be able to draw custom designs on a canvas 
from a script. I already have my own lightweight script with a simple list of 
commands like "LIN 0,0,100,100,3" which draws a line from 0x0 to 100x100 and is 
3 pixels thick. I would instead like to implement IF/THEN/ELSE statements to 
allow me to customize how things are drawn depending on current state. For 
example, drawing a building blueprint and drawing a door either opened or 
closed, or a light on or off (yellow or gray).

Original issue reported on code.google.com by djjd47...@gmail.com on 2 Nov 2012 at 12:13

GoogleCodeExporter commented 8 years ago
Scratch that second half out, shortly after posting I realized that was part of 
the sample code. Problem still exists, but please pardon the rant.

Original comment by djjd47...@gmail.com on 2 Nov 2012 at 12:28

GoogleCodeExporter commented 8 years ago
I can't reproduce your issue... did you copy-paste the code from

http://code.google.com/p/dwscript/wiki/FirstSteps

or did you re-type it/deviate from it?

Original comment by zar...@gmail.com on 2 Nov 2012 at 10:18

GoogleCodeExporter commented 8 years ago
Yes I did that exact first-steps tutorial. Strangely, I came back to the 
project and now it's working, without making any changes. Now I'm just trying 
to figure out how to write my own script which doesn't fail to compile.

Original comment by djjd47...@gmail.com on 3 Nov 2012 at 5:32

GoogleCodeExporter commented 8 years ago
Resolved completely, I don't know what caused the issue but it seemed to fix 
its self and I'm well into the scripting.

Original comment by djjd47...@gmail.com on 3 Nov 2012 at 11:50

GoogleCodeExporter commented 8 years ago
Ok, maybe there was something mistyped in the script?

Original comment by zar...@gmail.com on 5 Nov 2012 at 7:30

GoogleCodeExporter commented 8 years ago
I'm thinking the problem was some garbage data coming out of the TMemo.Lines, I 
had gone directly to typing into a TMemo and passing it to DWS. It was an 
unknown short-term issue and I'm well on my way now. Thanks for your prompt 
response though!

Original comment by djjd47...@gmail.com on 6 Nov 2012 at 1:17

GoogleCodeExporter commented 8 years ago
When you have "Script compiled with errors. Can't execute!" you can check the 
program's Msgs for compile errors, that'll give you syntax errors and other 
things so you can figure out what's wrong.

Original comment by zar...@gmail.com on 6 Nov 2012 at 8:39