From: Qfm
Why isn't this compiling?
[ATTACH=CONFIG]23890[/ATTACH]
thanks for all ur help so far btw
Well, you have some pretty bad "standards" there :p You should indent (pad with two spaces) for each "
begin <padded code> end;" then unindent after then
end-keyword. Such also goes for other keywords like
var and
const.. and such, even tho thise does not end with "end", they and with the next keyword (begin, function, procedure, type, etc).
var
x,y:Integer;
const
a,b:Integer;
begin
if a=b then
begin
doSometing();
if x=y then
begin
WriteLn('Hello world');
DoSomethingWith(x,y);
end;
end;
end;
What people have suggested here is something you should looking in too, (but it's all up to you,) but don't except am to stop bothering you about it, until you got somewhat more proper "standards" in your script.
As for your problem, you have not filled in the Tolerance-parameter (the last one).
FindColorSpiralTolerance(var x,y: Integer; Color, x1,y1,x2,y2, Tolernace:Integer);
It's not that hard to decode most of the error-messages your self. This case should be very easy: it says that there is no function under that name (FindColorSpiralTolerance) which takes those exact parameters, and knowinmg that you can look up the function in the docs (
http://docs.villavu.com/simba/scriptref/colourfinding.html#findcolorspiraltolerance) and you see that you are actually missing the last parameter.
Or, you can use the function-list (in Simba) for this as well.
On another note, I want to mention that each single
end should end with a
semicolon:
end;. Just because something might run, doesn't mean it's "correct", lol. The only exception is the last
end of a script, that one should end with a period:
end., as nothing after that period should be executed.
Example (regarding the last "end" in a script).
This will run without any issues:
program Asd;
begin
WriteLn('hello world');
end.
What the fuck is up!?? :D
But the following will fail:
program Asd;
begin
WriteLn('hello world');
end //You can append a ";", doesn't matter. Full-stop or null stop, simple as that :P
What the fuck is up!?? :D