SRL Archive - First Scripts

My First Ever Attempt!


Belt

2007-10-07 19:57:56

I have been reading and following along with all the tutorials in the Beginner section.

I will update this as I work on it.
Right now, I just tried to something basic, where if it finds a color on the screen,
it will Writeln('FoundColor')
I got an error though, so I just wanted somebody to see what I did incorrectly, so I can learn for the next time.
program New;
var
MonsterColor : integer;
const
MonsterColor=16777215
begin
Procedure Findin;
Findcolor(x,y,MonsterColor,10,10)
If FindColor
then
Writeln('Found Color')
end else
Writeln('Didn't find Color')
end.

Also, please tell me how I did on the standards.


Thank you :)

PwNZoRNooB

2007-10-08 10:05:48

program New;
var
MonsterColor : integer;
const
MonsterColor=16777215
begin
Procedure Findin;
Findcolor(x,y,MonsterColor,10,10)
If FindColor
then
Writeln('Found Color')
end else
Writeln('Didn't find Color')
end.

program New;
var
MonsterColor : integer;
const
MonsterColor=16777215;

Procedure Findin;
begin
if(Findcolor(x,y,MonsterColor,10,10)) then
Writeln('Found Color')
end else
Writeln('Didn''t find Color')
end;

begin
Findin;
end.

IronTeapot

2007-10-08 10:14:59

program New;
const
MonsterColor=16777215
begin
Procedure Findin;
Findcolor(x,y,MonsterColor,10,10)
If FindColor
then
Writeln('Found Color')
end else
Writeln('Did not find Color')
end.

begin
Findin;
end.

You dont need to tell that monstercolor is an integer if your declaring it as a const. const >numbers, automatically make it an integer. Also, post the error message next time instead of just saying there was an error, may help greatly in larger situations.

Lokan

2007-10-08 17:31:17

Nice attempt. Good job on the base of it though. Keep up the good work. :)

gamer 5

2007-10-08 18:36:14

Alomst There you got the basic understanding.
I know because im still learning how to script!!!