View Full Version : if and else
i need to bot!
03-08-2012, 09:07 PM
Hey people :), i haven't been on villavu for a while, and am finally back- but i came upon a problem when using 'else'. My goal is to say 'if find this dtm, click, else, if find this other dtm, click'.. but I don't quite know how to use 'else' :'(
as in:
if FindDTM(wai1, x, y, MMX1, MMY1, MMX2, MMY2) then
Mouse (x, y, 0, 0, true);
else if FindDTM(wai2, x, y, MMX1, MMY1, MMX2, MMY2 then
Mouse (x, y, 0, 0, true);
thanks in advance :D
x[Warrior]x3500
03-08-2012, 09:14 PM
use this as a template
program new;
const
a=1;
begin
if (a=1) then
begin
writeln('1');
end else if (a=2) then
begin
writeln('2');
end else
begin
writeln('3');
end;
end.
Nah, he's just missing a parentheses.
masterBB
03-08-2012, 09:36 PM
What parenthesis ?
if FindDTM(wai1, x, y, MMX1, MMY1, MMX2, MMY2) then
Mouse (x, y, 0, 0, true)
else if FindDTM(wai2, x, y, MMX1, MMY1, MMX2, MMY2 then
Mouse (x, y, 0, 0, true);
What parenthesis ?
else if FindDTM(wai2, x, y, MMX1, MMY1, MMX2, MMY2 then
To end the second FindDTM
Nebula
03-08-2012, 09:38 PM
The parentheses after MMY2
^^He said it first :(
But yeah just add the parentheses and it should work.
masterBB
03-08-2012, 09:42 PM
Then this one needed two fixes ;)
if FindDTM(wai1, x, y, MMX1, MMY1, MMX2, MMY2) then
Mouse (x, y, 0, 0, true) //removed ;
else if FindDTM(wai2, x, y, MMX1, MMY1, MMX2, MMY2) then //added )
Mouse (x, y, 0, 0, true);
i need to bot!
03-08-2012, 09:56 PM
thanks :D just needed to get rid of the ';' after mouse xD
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.