Log in

View Full Version : Wont compile when using "findtext"



stein3
03-30-2007, 09:06 PM
begin
repeat
findcolor(xc,yc,13290192,0,0,515,338);
wait(100)
clickmouse(xc,yc,false);
wait(100)
if findtext('Take Bones')
clickmouse(xc-8,yc-8,true)
wait(10000)
until(inchat('enough inventory space to hold that item'))

I don't know if I'm doing that right. When I start it says "Line 16: [Error] (17677:13): Variable Expected in script"

line 16 is if findtext('take bones')

JAD
03-30-2007, 09:14 PM
if FindText(x,y,'text') then

I think thats how its supposed to be done.

stein3
03-30-2007, 09:20 PM
what is the x,y supposed to be?
Where the text starts or the middle or what?

JAD
03-31-2007, 02:45 AM
Sorry, I didn't write the function lol :p I don't know about your question, somebody else maybe able to answer it though.

stol3n
03-31-2007, 08:31 AM
Hey,



if (IsUpText('Take Bones')) then
begin
GetMousePos(x, y);
Mouse(x, y, 2, 2, False);
wait(10000)
until(inchat('enough inventory space to hold that item'))

Should Do the trick and be fast

~alex~
03-31-2007, 10:09 AM
Yeah what stolen said, by the way for you If statmets they need to be like this.

If (condtion) then

You forgot about the 'then' :P

stein3
03-31-2007, 12:20 PM
if (IsUpText('Take Bones')) then
begin
GetMousePos(x, y);
Mouse(x, y, 2, 2, False);
wait(10000)
until(inchat('enough inventory space to hold that item'))

identifier expected in the until(inchat(''))
what the...

JAD
03-31-2007, 03:08 PM
You don't have a repeat there (as far as I know..) or you didn't count your begins and ends properly.

Hey321
03-31-2007, 03:42 PM
JAD you are correct! You get one million coins! Then you have to give me 1000million coins... Anywys, it's because you don't have a repeat stuck in there ;).

Jason2gs
03-31-2007, 11:40 PM
And because he didn't close off the begin.