• Log in or sign up for an account here: https://www.sythe.org/login

Procedure Bug and More...

Madslash

Newcomer
Joined
Dec 11, 2008
Sythe Gold
0
Messages
17
I use SCAR Divi 3.20d.
Well first off, when I try to download includes, this happens.
Something pops up and says "Error while obtaining includes list!"
In the debug box it says the following:

Downloading includes from web...
Include files updated from web

But when I check the includes folder, all that is in it is "SRL" and "placeholder.txt"
__________
Second.
When I try to add a procedure to my script, it saying this.

Line 2: [Error] (2:10): Identifier expected in script

The only things in my script are this.
_____________
program New;
procedure;
begin
end.
_____________

Any help would be appriciated. Thanks.
 
I use SCAR Divi 3.20d.
Well first off, when I try to download includes, this happens.
Something pops up and says "Error while obtaining includes list!"
In the debug box it says the following:

Downloading includes from web...
Include files updated from web

But when I check the includes folder, all that is in it is "SRL" and "placeholder.txt"
__________
Second.
When I try to add a procedure to my script, it saying this.

Line 2: [Error] (2:10): Identifier expected in script

The only things in my script are this.
_____________
program New;
procedure;
begin
end.
_____________

Any help would be appriciated. Thanks.
i have the same problem with the includes.. somethings wrong with it
Code:
Program New;

const//settings of scipt are below const
loops = 5;//how many times you want the script to repeat procedure "Firstprocedure"

var i:integer;

procedure Firstprocedure; //remember to name the procedure!
begin
i:= i + 1
writeln('...')
wait(1000)
end;

begin              //this is the begin of the main loop
repeat
 Firstprocedure;
until(i = loops)
end.               //end of main loop

i think you should study this
http://www.mmorpguides.com/forum/Beginners-Guide-Scriptin-t18170.html
its a good TUT for beginners and it gives you information about procedures
 
Here is my current script:
_____________________________________________________
program MadslashsIronMiner;

var
o: Integer;
LoadIronOreBmp: Integer;
a,b: Integer;
c,d: Integer;

const
IronOre1 = 1713472;
IronOre2 = 1581628;

begin

procedure LoadIronOreBmp;
begin
IronOreBmp := BitmapFromString(23, 20, 'beNqdk/9LwkAYxm/WDy' +
'USK6RmRN10qUOq+aUxS9ZNRJQQpkZRISlJVAQVBEF/fc82d1vLwHW' +
'8yNze+9zzPu97hPy1zDLt1vOECP4LwY8Yq1VTumKe/1U3RLolFhNi' +
'HI7wNNAReNpdT4FQ2UmbuUyFcMhCwlyCk6ak16gknsgSIPqSBxE6J' +
'D8+L9/3qgtqcgohDsQLEAqyZJHs2Daer+rhzJK8ebQvVYvb8LNZy4' +
'Y/oRC+3QskWFLu6+4MEc5s6wp6wRryZevANlXuzGoy8at8AZmoxYN' +
'MhwaHME3pNQo2UVmTDlgAIeIylEQ8Zyl5ahsgfI5M/hJVOART7TP6' +
'YB/ftA/5BpqeuaHvbfK+QMZ4UAPk47bhpVWLUoUSaIAAxiiO4J84J' +
'JHNoDWuLT8khSezWaNDqwQBY7v8fn2K4Id6rv6EzBkPx1IjDz8hct' +
'Kvg/DqNC5Ii0DULRERgVgkh1q6THu5MNB6/CIiOYD4AlYwNkUhCkE' +
'VLabhdH/7rKFQiBpZRws3VxETcPiXOcSx2pXhE2YLhFFHcwc7gHjz' +
'78/efJODSSDU6mgTVnm0tbjXP4AkZWjAHYyYHA9izSBo1uJXNQpxR' +
'xcuvV0b/1USc30DNF9prg==');
end;

o:= 0
repeat

if(FindColor(a,b,IronOre1,0,0,764,504)) then
begin
o:= o + 1
MoveMouseSmooth(a,b+random(10));
Wait(450+random(100));
ClickMouse(a,b,true);
Writeln('Found Iron - Mining.');
end else
Writeln('Could Not Find Any Iron.');
Wait(4500+random(1000));

if(FindColor(c,d,IronOre2,0,0,764,504)) then
begin
MoveMouseSmooth(c,d+random(10));
Wait(450+random(100));
ClickMouse(c,d,true);
Writeln('Found Iron - Mining.');
end else
Writeln('Could Not Find Any Iron.');
Wait(4500+random(1000));

until(o >= 5);

begin
LoadIronOreBmp;
end;

end.
____________________________________________________
in the debug box, it says...

Line 15: [Error] (17:1): Identifier expected in script C:\Program Files\SCAR 3.20\Scripts\MadslashsAutoMiner.scar

I can't figure out why it isn't working, even after checking that guide. =(
 
now it should compile
Code:
program MadslashsIronMiner;

var
o,x,y,IronOreBmp: Integer;

const
loops = 5;   // loops to do

procedure LoadIronOreBmp;
begin
IronOreBmp := BitmapFromString(23, 20, 'beNqdk/9LwkAYxm/WDy' +
'USK6RmRN10qUOq+aUxS9ZNRJQQpkZRISlJVAQVBEF/fc82d1vLwHW' +
'8yNze+9zzPu97hPy1zDLt1vOECP4LwY8Yq1VTumKe/1U3RLolFhNi' +
'HI7wNNAReNpdT4FQ2UmbuUyFcMhCwlyCk6ak16gknsgSIPqSB xE6J' +
'D8+L9/3qgtqcgohDsQLEAqyZJHs2Daer+rhzJK8ebQvVYvb8LNZy4' +
'Y/oRC+3QskWFLu6+4MEc5s6wp6wRryZevANlXuzGoy8at8AZmoxY N' +
'MhwaHME3pNQo2UVmTDlgAIeIylEQ8Zyl5ahsgfI5M/hJVOART7TP6' +
'YB/ftA/5BpqeuaHvbfK+QMZ4UAPk47bhpVWLUoUSaIAAxiiO4J84J' +
'JHNoDWuLT8khSezWaNDqwQBY7v8fn2K4Id6rv6EzBkPx1IjDz 8hct' +
'Kvg/DqNC5Ii0DULRERgVgkh1q6THu5MNB6/CIiOYD4AlYwNkUhCkE' +
'VLabhdH/7rKFQiBpZRws3VxETcPiXOcSx2pXhE2YLhFFHcwc7gHjz' +
'78/efJODSSDU6mgTVnm0tbjXP4AkZWjAHYyYHA9izSBo1uJXNQpxR ' +
'xcuvV0b/1USc30DNF9prg==');
end;


Procedure Mine;
begin
if FindBitmap(IronOreBmp,x,y)then
begin
o:= o + 1
MoveMouseSmooth(x+random(5),y+random(5));
Wait(450+random(100));
ClickMouse(x,y,true);
Writeln('Found Iron - Mining.');
end else
begin
Writeln('Could Not Find Any Iron.');
Wait(4500+random(1000));
end;
end;

begin                 //this is the main loop
LoadIronOreBmp;       //you had only LoadIronOreBmp procedure here
repeat                //so it would only load the bitmap and then stop the script
mine;                 //u need to write all procedure names here you want it to run
until( o = loops)
end.
 
Runescape Gamblingrunescape gambling
Back
Top