View Full Version : Type mismatch error? HELP PLZ
gerauchert
06-11-2007, 01:54 AM
ok so im trying to add marktime into my powerchopping procedure and just when i think ive figured it out...Line 97: [Error] (17764:32): Type mismatch in script C:\Program Files\SCAR 2.03\Scripts\gerauchertWcer.scar
sooo ill post the code that its affecting and see what you can make of it :sasmokin:
procedure Chop;
var WaitTime: Integer;
begin
SetRun(True);
GameTab(4);
Wait(500 + random(250));
if(FindColorTolerance(x,y,TreeColor,MSX1,MSY1,MSX2 ,MSY2,3))then
begin
repeat
MMouse(x,y,2,1);
if IsUpText('illow') then
Mouse(x,y,3,3,False)
ChooseOption(x,y,'hop');
MarkTime(WaitTime);
while (MarkTime(WaitTime)< 5000) do //THIS IS LINE 97!!!! <<<<<<-----
begin
If(FindEnt(TreeColor)) or (FindFastRandoms)then break;
case Random(12) of
2: MouseBox(MSX1, MSY1,MSX2, MSY2, 3);
4: PickUpMouse;
6: BoredHuman;
8: HoverSkill('Random', False);
10: RandomRClick;
12: AlmostLogOut;
until(InvFull);
end;
end;
end;
Bobarkinator
06-11-2007, 02:03 AM
Change that line to this
while TimeFromMark(WaitTime)<5000 do
Mark time starts the time at 0 and starts marking it, TimeFromMark gets the time in milliseconds of the marked time you specify.
Wanted
06-11-2007, 02:14 AM
MarkTime start adding, TimeFromMark loads the value of the marked time.
here
while (TimeFromMark(WaitTime) < 5000) do
MarkTime start adding, TimeFromMark loads the value of the marked time.
here
while (TimeFromMark(WaitTime) < 5000) do
Maybe if you looked you may have saw that bobarkinator posted the EXACT same thing?? :p
Bobarkinator
06-11-2007, 02:24 AM
no...he put another set of parentheses around it lol
Santa_Clause
06-11-2007, 04:29 AM
Is JAD always criticising people...?
Is JAD always criticising people...?
I was just kidding around... And usually only on apps.
Wanted
06-11-2007, 08:03 PM
1) He had bad standards (no offense)
2) He didn't explain it at ALL, that's why I posted.
Yes I did read every post in this thread, I thought I would just help a little further.
gerauchert
06-12-2007, 05:35 PM
lol thanks guys im gonna try it out :spot:
gerauchert
06-13-2007, 03:49 AM
ok so...thanks again for helpin me with that error...BUT
I have a syntax error now...:mad:
Line 107: [Error] (17774:1): Syntax error in script C:\Program Files\SCAR 2.03\Scripts\gerauchertWcer.scar
Yep no clue what that means ffs....:duh:
Can some1 explain to me what it is and how to fix it in my script please?
thanks :D
procedure Chop;
var WaitTime: Integer;
begin
SetRun(True);
GameTab(4);
Wait(500 + random(250));
if(FindColorTolerance(x,y,TreeColor,MSX1,MSY1,MSX2 ,MSY2,3))then
begin
repeat
MMouse(x,y,3,3);
if IsUpText('illow') then
Mouse(x,y,3,3,False)
ChooseOption(x,y,'hop');
MarkTime(WaitTime);
while (TimeFromMark(WaitTime) < 5000) do
begin
If(FindFastRandoms) or (InvFull) then break;
case Random(12) of
2: MouseBox(MSX1, MSY1,MSX2, MSY2, 3);
4: PickUpMouse;
6: BoredHuman;
8: HoverSkill('Random', False);
10: RandomRClick;
12: AlmostLogOut;
until(InvFull); // <<<<<-----LINE 107
end;
end;
end;
Jason2gs
06-13-2007, 06:03 AM
You're ending a "repeat" while inside a Case..Of
Edit:
Oh, and you don't "end;" the Case..Of
All Case..Ofs will come to an end; (:p)
gerauchert
06-13-2007, 06:37 PM
so do i need to just get rid of the until or do i need to move it somewhere else?
if i get rid of the the until it gives me the identifier expected error...
ahh this is confusing.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.