SCAR Code:Count := 0;
repeat
Wait(200 + (Random(500)));
AntiRandom;
Int(Count);
until(Count = 20);
could anyone offer an explanation on why this loop doesn't end before i log out automatically?
SCAR Code:Count := 0;
repeat
Wait(200 + (Random(500)));
AntiRandom;
Int(Count);
until(Count = 20);
could anyone offer an explanation on why this loop doesn't end before i log out automatically?
Shouldn't it be
SCAR Code:inc(count)
not
SCAR Code:int(count)
“Ignorance, the root and the stem of every evil.”
Let me try, thanks for the reply.
edit: yeah that was my problem i think, thanks!
Now I've come across another problem that i didn't encounter last night when i was testing/debugging.
SCAR Code:Function FindFountain : boolean;
Var
Bx, By : Integer;
Full : Integer;
Empty : Integer;
count : Integer;
x1, y2 : Integer;
Begin //////////////INSERT FOUNTAIN COLOR////////////////
if(FindColorTolerance(Bx,By,14198672,MSX1,MSY1,MSX2,MSY2,25)) then
Begin
Full := DTMFromString('78DA633CCBC4C050C7C8800C162F3F08A661A' +///////full Vial
'28CB7806AAA50D5C064E16AAE02D5141250731DA82687809A8B40' +
'356904D49C02AAA924C29C66FC6A00E5E10B2B');
Empty := DTMFromString('78DA633CCFC4C030879101199495578069982' +///////empty Vial
'8E30DA09AD9A86A60B27035B7816A1613507316A86619116AA613' +
'500372731F0135D7816A26E0570300E43A0B86');
WriteLn('Found Fountain');
if(FindDTM(Empty, x1, y2, MIX1, MIY1, MIX2, MIY2))then
begin
WriteLn('Filling Vials...')
Mouse(x1, y2, 5, 5, true);
Mouse(Bx, By, 5, 5, true);
Count := 0;
repeat
Wait(200 + (Random(500)));
AntiRandom;
Inc(Count);
until(Count = 20);
end;
end else
Result := False;
WriteLn('Couldnt Find Fountain')
Exit;
end;
When it walks to the fountain it says both Found Fountain and Couldn't Find Fountain so i'm having trouble seeing where the problem is.
For one thing, There aren't any semicolons after the writelns.
Nice script though.
Yes, there are semi-colons after pretty much every line.
SCAR Code:Function FindFountain : boolean;
Var
Bx, By : Integer;
Full : Integer;
Empty : Integer;
count : Integer;
x1, y2 : Integer;
Begin //////////////INSERT FOUNTAIN COLOR////////////////
if(FindColorTolerance(Bx,By,14198672,MSX1,MSY1,MSX2,MSY2,25)) then
Begin
Full := DTMFromString('78DA633CCBC4C050C7C8800C162F3F08A661A' +///////full Vial
'28CB7806AAA50D5C064E16AAE02D5141250731DA82687809A8B40' +
'356904D49C02AAA924C29C66FC6A00E5E10B2B');
Empty := DTMFromString('78DA633CCFC4C030879101199495578069982' +///////empty Vial
'8E30DA09AD9A86A60B27035B7816A1613507316A86619116AA613' +
'500372731F0135D7816A26E0570300E43A0B86');
WriteLn('Found Fountain');
if(FindDTM(Empty, x1, y2, MIX1, MIY1, MIX2, MIY2))then
begin
WriteLn('Filling Vials...');
Mouse(x1, y2, 5, 5, true);
Mouse(Bx, By, 5, 5, true);
Count := 0;
repeat
Wait(200 + (Random(500)));
AntiRandom;
Inc(Count);
until(Count = 20);
end;
end else
begin //This
Result := False;
WriteLn('Couldnt Find Fountain');
Exit;
end; //This
end;
You need a begin/end after your end else :]
Should be:SCAR Code:end else
Result := False;
WriteLn('Couldnt Find Fountain')
Exit;
SCAR Code:end else
Begin
Result := False;
WriteLn('Couldnt Find Fountain')
Exit;
End;
Lawlz. I beat j00 Cazax =]
Are you making a clay softener yvw?
I'm making a VEB vial filler and i've encountered another problem. Fixing the end else showed that something was wrong with the dtm part of the function. any tips? sorry for all the hassle!
Try this
SCAR Code:Function FindFountain : boolean;
//credits to noidea
Var
Bx, By : Integer;
Full : Integer;
Empty : Integer;
count : Integer;
x1, y2 : Integer;
Begin //////////////INSERT FOUNTAIN COLOR////////////////
Full := DTMFromString('78DA633CCBC4C050C7C8800C162F3F08A661A' +///////full Vial
'28CB7806AAA50D5C064E16AAE02D5141250731DA82687809A8B40' +
'356904D49C02AAA924C29C66FC6A00E5E10B2B');
Empty := DTMFromString('78DA633CCFC4C030879101199495578069982' +///////empty Vial
'8E30DA09AD9A86A60B27035B7816A1613507316A86619116AA613' +
'500372731F0135D7816A26E0570300E43A0B86');
if(FindColorTolerance(Bx,By,14198672,MSX1,MSY1,MSX2,MSY2,25)) then
Begin
WriteLn('Found Fountain');
if(FindDTM(Empty, x1, y2, MIX1, MIY1, MIX2, MIY2))then
begin
WriteLn('Filling Vials...')
Mouse(x1, y2, 5, 5, true);
Mouse(Bx, By, 5, 5, true);
repeat
Wait(200 + (Random(500)));
AntiRandom;
until(not(FindDTM(Empty, x1, y2, MIX1, MIY1, MIX2, MIY2)))
end;
end else
begin
Result := False;
WriteLn('Couldnt Find Fountain')
freeDTM(Empty)
freeDTM(Full)
Exit;
end;
freeDTM(Empty)
freeDTM(Full)
Result := True;
end;
Originally Posted by irc
There weren't any semicolons after the writelns for the couldnt find fountains
in the script that HE posted..
There are currently 1 users browsing this thread. (0 members and 1 guests)