SRL Archive - Help and Support

Assignment expected in script


ub3r |<1||3r*1337*

2006-04-14 10:55:14

i have this error

Line 19: [Error] (9019:11): Assignment expected in script C:\Program Files\SCAR 2.03\Scripts\al-kharid silk buyer.scar
what are the causes of this?

XxKanexX

2006-04-14 11:02:36

Post the line please. I don't study every error and what they mean :p..

But it could mean that you've forgotten a colon somewhere?

var a: integer;
begin
a=3;
end.

ub3r |<1||3r*1337*

2006-04-14 11:04:52

well… now i have another error, somehow… well here is the troublesome line

///////////////SETUP////////////////////////////
Const
logoff = 0;///how many loads until the script shall log off?
bankcolor = 0;/// bank symbol color
silkcolor = 0;///silk color symbol
man = 0;/// color of the seller's pink suit
User =''
Pass =''
////////Thats all folks!////////////////////////////

XxKanexX

2006-04-14 11:33:15

Always end constants with a semi colon!


///////////////SETUP////////////////////////////
Const
logoff = 0;///how many loads until the script shall log off?
bankcolor = 0;/// bank symbol color
silkcolor = 0;///silk color symbol
man = 0;/// color of the seller's pink suit
[B]User ='';
Pass ='';[/B]
////////Thats all folks!////////////////////////////

ub3r |<1||3r*1337*

2006-04-14 11:39:56

dam… i forgot… again… how could i do this to myself???

EDIT: got another problem…:/

///////////////SETUP////////////////////////////
Const
logoff = 0;///how many loads until the script shall log off?
bankcolor = 0;/// bank symbol color
silkcolor = 0;///silk color symbol
man = 0;/// color of the seller's pink suit
User ='' ;
Pass ='' ;
////////Thats all folks!////////////////////////////

BenLand100

2006-04-14 11:49:42

The variable BankColor is defined withen SRL, choose a different name for it ;)

ub3r |<1||3r*1337*

2006-04-14 12:01:52

i've never seen this error before…

Line 35: [Error] (9035:56): Close round expected in script C:\Program Files\SCAR 2.03\Scripts\al-kharid silk buyer.scar
in this place
if (findcolortolerance(x,y,silkcolors,642,20,708,74,3) then

BenLand100

2006-04-14 12:15:16

From: ub3r |<1||3r
i've never seen this error before…

Line 35: [Error] (9035:56): Close round expected in script C:\Program Files\SCAR 2.03\Scripts\al-kharid silk buyer.scar
in this place
if (findcolortolerance(x,y,silkcolors,642,20,708,74,3) then

if (findcolortolerance(x,y,silkcolors,642,20,708,74,3)[B])[/B] then
Try to figure it out on your own before posting ;)

ub3r |<1||3r*1337*

2006-04-14 12:18:33

good point…

weaselforce

2006-04-14 12:24:30

suprisingly, error messages can be read, and sometimes easily understood. [/sarcasm]

ub3r |<1||3r*1337*

2006-04-14 13:55:57

how do you get rid of the little help line that comes up when you are typing in for example: findcolortolerance

it lags the window…

Sdcit

2006-04-14 14:03:48

you cant, what i do is i memorize the parameters and just put a space after the ( and click elsewhere. Click that spot and type up the parameters

Bebe

2006-04-14 14:07:56

I never figure it out, mostly because I never tried :p

If it lags your window, then I think it is time that you get a new computer :p

edit: Just looked, and I couldn't fid a way.

ub3r |<1||3r*1337*

2006-04-14 14:30:09

a new comp? you gotta be kidding me! i have a 3.2GHz comp with 512mb of ram! or… mabye i have too many processes running

Bebe

2006-04-14 14:34:49

Maybe, because SCAR has never lagged my computer.

Sdcit

2006-04-14 15:04:42

it WILL lag. Follow my tip and you should be fine :P

ub3r |<1||3r*1337*

2006-04-14 15:13:13

alright then, i will

i've made my al-kharid silk buyer and still updating it!

BenLand100

2006-04-14 15:27:11

No lag here either ;)

ub3r |<1||3r*1337*

2006-04-14 16:00:21

ok, now i'm trying to work out bitmaps, this is what i'm trying to do…

i want to click the mouse at the location that i already requested, and when the mouse flag goes away, it will click again. my script so far, that i hoped for this to work…


program silkbuyer;
///////////////////////////////////////////////////////////////////////////
///this will buy silk and bank them, improvements can be PMed to me on
///villavu.com/forums made by: ub3r l<1ll3r
///////////////////////////////////////////////////////////////////////////
///in al-kharid bank, go to the most northern bankbooth that is available
///put your money in first bank slot
///Put nothing in the last slot
{.Include SRL\SRL.scar}
{version info:
V1:very unstable[unreleased]
V1.9:a lot more stable with double clicking[unreleased]
V1.95: tested and being released}

var
flagg:integer;
N:string;

///////////////SETUP////////////////////////////
Const
bankcolors = 6745329;/// bank symbol color
silkcolors = 9448626;///silk color symbol
man = 12491685;/// color of the seller's pants
cabab = 11392491;///color of the cabab symbol at the bank
sword = 1786975;///sword shop's ladder
////////Thats all folks!////////////////////////////
procedure Setup;
Begin
flagg := BitmapFromString(33, 33, 'z78DAEDD4B10980300044D195' +
'1262B28092FD47522B41440BAB83F726B8DFDC9C00642987BEB55' +
'66BEEFEE48A6B7F66C57D7F5AC5F3FE9C8AB7FD0915DFFBF33FEA' +
'B48E3ECAA242850A152A540000FCB7035B5DE8B2');
end;
procedure movesilk;
begin
Face(N)
wait(1000)
if (findcolortolerance(x,y,cabab,628,19,703,53,3)) then
Mouse(x,y,1,1,True)
repeat
wait(2000)
until(FindbitmaptoleranceIn(flagg,x,y,578,9,723,146,9)=False)
Face(N)
if (findcolortolerance (x,y,sword,659,19,702,35,3)) then
Mouse(x,y,1,1,true)else
repeat
wait(2000)
until(FindbitmaptoleranceIn(flagg,x,y,578,9,723,146,9)=False)
if (findcolortolerance(x,y,silkcolors,597,26,709,118,8)) then
Mouse(x,y,1,1,True)else
repeat
wait(2000)
until(FindbitmaptoleranceIn(flagg,x,y,578,9,723,146,9)=False)
end;
procedure buy;
begin
repeat
if (findcolortolerance(x,y,man,4,4,514,337,8)) then
Mouse(x,y,0,0,True)
Mouse(x,y,0,0,True)
wait(3000)
MMouse(224,444,1,0)
wait(800)
Mouse(224,444,1,0,True)
Mouse(224,444,1,0,True)
wait(1000)
MMouse(270,395,1,0)
wait(800)
Mouse(270,395,1,0,True)
Mouse(270,395,1,0,True)
wait(1000)
MMouse(203,448,1,0)
wait(800)
Mouse(203,448,1,0,True)
Mouse(203,448,1,0,True)
wait(1000)
MMouse(280,446,1,0)
Mouse(280,446,1,0,True)
Mouse(280,446,1,0,True)
wait(2000)
MMouse(238,432,1,0)
Mouse(238,432,1,0,True)
Mouse(238,432,1,0,True)
wait(1000)
MMouse(217,445,1,0)
Mouse(217,445,1,0,True)
wait(1000)
MMouse(290,447,1,0)
Mouse(290,447,1,0,True)
Mouse(290,447,1,0,True)
wait(2000)
Until(findcolortolerance(x,y,8625060,703,434,724,454,8))
end;
procedure goback;
begin
Face(N)
wait(1000)
if (findcolortolerance(x,y,sword,594,114,616,139,3)) then
repeat
wait(2000)
until(FindbitmaptoleranceIn(flagg,x,y,578,9,723,146,9)=False)
if (findcolortolerance (x,y,cabab,578,96,611,135,3)) then
repeat
wait(2000)
until(FindbitmaptoleranceIn(flagg,x,y,578,9,723,146,9)=False)
if (findcolortolerance(x,y,bankcolors,609,116,653,148,3)) then
repeat
wait(2000)
until(FindbitmaptoleranceIn(flagg,x,y,578,9,723,146,9)=False)
if (findcolortolerance(x,y,bankcolors,602,57,656,115,8)) then
Mouse(x,y,1,1,True)
repeat
wait(2000)
until(FindbitmaptoleranceIn(flagg,x,y,578,9,723,146,9)=False)
OpenBank;
wait(3000)
Deposit(5,6,2)
wait(5000)
end;

Begin
SetupSRL;
Setup;
repeat
movesilk;
buy;
goback;
Until(false)
End.

Bebe

2006-04-14 16:52:59

Your version with standards added:
program silkbuyer;
{.Include SRL\SRL.scar}
///////////////////////////////////////////////////////////////////////////
///this will buy silk and bank them, improvements can be PMed to me on
///villavu.com/forums made by: ub3r l<1ll3r
///////////////////////////////////////////////////////////////////////////
///in al-kharid bank, go to the most northern bankbooth that is available
///put your money in first bank slot
///Put nothing in the last slot
{version info:
V1:very unstable[unreleased]
V1.9:a lot more stable with double clicking[unreleased]
V1.95: tested and being released}

var
flagg:integer;
N:string;

///////////////SETUP////////////////////////////
Const
bankcolors = 6745329;/// bank symbol color
silkcolors = 9448626;///silk color symbol
man = 12491685;/// color of the seller's pants
cabab = 11392491;///color of the cabab symbol at the bank
sword = 1786975;///sword shop's ladder
////////Thats all folks!////////////////////////////

procedure Setup;
Begin
flagg := BitmapFromString(33, 33, 'z78DAEDD4B10980300044D195' +
'1262B28092FD47522B41440BAB83F726B8DFDC9C00642987BEB55' +
'66BEEFEE48A6B7F66C57D7F5AC5F3FE9C8AB7FD0915DFFBF33FEA' +
'B48E3ECAA242850A152A540000FCB7035B5DE8B2');
end;

procedure movesilk;
begin
Face(N)
wait(1000)
if (findcolortolerance(x,y,cabab,628,19,703,53,3)) then
Mouse(x,y,1,1,True)
repeat
wait(2000)
until(FindbitmaptoleranceIn(flagg,x,y,578,9,723,146,9)=False)
Face(N)
if (findcolortolerance (x,y,sword,659,19,702,35,3)) then
Mouse(x,y,1,1,true)else
repeat
wait(2000)
until(FindbitmaptoleranceIn(flagg,x,y,578,9,723,146,9)=False)
if (findcolortolerance(x,y,silkcolors,597,26,709,118,8)) then
Mouse(x,y,1,1,True)else
repeat
wait(2000)
until(FindbitmaptoleranceIn(flagg,x,y,578,9,723,146,9)=False)
end;

procedure buy;
begin
repeat
if (findcolortolerance(x,y,man,4,4,514,337,8)) then
Mouse(x,y,0,0,True)
Mouse(x,y,0,0,True)
wait(3000)
MMouse(224,444,1,0)
wait(800)
Mouse(224,444,1,0,True)
Mouse(224,444,1,0,True)
wait(1000)
MMouse(270,395,1,0)
wait(800)
Mouse(270,395,1,0,True)
Mouse(270,395,1,0,True)
wait(1000)
MMouse(203,448,1,0)
wait(800)
Mouse(203,448,1,0,True)
Mouse(203,448,1,0,True)
wait(1000)
MMouse(280,446,1,0)
Mouse(280,446,1,0,True)
Mouse(280,446,1,0,True)
wait(2000)
MMouse(238,432,1,0)
Mouse(238,432,1,0,True)
Mouse(238,432,1,0,True)
wait(1000)
MMouse(217,445,1,0)
Mouse(217,445,1,0,True)
wait(1000)
MMouse(290,447,1,0)
Mouse(290,447,1,0,True)
Mouse(290,447,1,0,True)
wait(2000)
Until(findcolortolerance(x,y,8625060,703,434,724,454,8))
end;

procedure goback;
begin
Face(N)
wait(1000)
if (findcolortolerance(x,y,sword,594,114,616,139,3)) then
repeat
wait(2000)
until(FindbitmaptoleranceIn(flagg,x,y,578,9,723,146,9)=False)
if (findcolortolerance (x,y,cabab,578,96,611,135,3)) then
repeat
wait(2000)
until(FindbitmaptoleranceIn(flagg,x,y,578,9,723,146,9)=False)
if (findcolortolerance(x,y,bankcolors,609,116,653,148,3)) then
repeat
wait(2000)
until(FindbitmaptoleranceIn(flagg,x,y,578,9,723,146,9)=False)
if (findcolortolerance(x,y,bankcolors,602,57,656,115,8)) then
Mouse(x,y,1,1,True)
repeat
wait(2000)
until(FindbitmaptoleranceIn(flagg,x,y,578,9,723,146,9)=False)
OpenBank;
wait(3000)
Deposit(5,6,2)
wait(5000)
end;

Begin
SetupSRL;
Setup;
repeat
movesilk;
buy;
goback;
Until(false)
End.

I would suggest that you use a random wait, and example would be:
wait(500+random(400))
This waits the normal 500 milliseconds plus picks a random number from (in this case) 0-400 and adds it to that 500 milliseconds. Thus helping in undetectability.

ub3r |<1||3r*1337*

2006-04-14 17:22:52

ok thanks for telling me that

ub3r |<1||3r*1337*

2006-04-14 19:01:47

By the way, how do you restart a procedure from the inside of a procedure? like…
procedure whatever;
Begin
clickmouse else
restart procedure;