SRL Archive - Help and Support

errors errors errors!


ub3r |<1||3r*1337*

2006-04-01 09:48:26

i keep getting this invaild parameters error in my first scripts which are pretty crappy.(still learning) and i have no idea how to fix it! can somebody put a "manual" on what type of errors to fix and how to fix them? and i keep getting an unknown identifier error for "ReadIn" and "writeIn".

krunkjuice

2006-04-01 10:42:35

can you post a copy of the script and what line your getting the error in?
Edit: Also the ReadIn and WriteIn i think is suppose to be Readln and Writeln, its an L instead of an I… Atleast that's what i put. So try changing those and compiling.

ReFLeX

2006-04-01 12:59:57

can't really help you with invalid paramenter, unless you post script

unexpected end of file is when you end somehting and you use end. Make sure you use end; , if it's not in your main loop

XxKanexX

2006-04-01 20:01:10

ReadLn - It's an "L", not I. Same with Write:
WriteLn - ^.

:)

ub3r |<1||3r*1337*

2006-04-02 08:10:54

oh ok, lol. i put in that In crap. oh well. i'll put my script up in a sec. but when i ever get an invaild parameter error, how do you fix it? what does it mean anyway?

EDIT: ok, i have my script(i made a brand new one cuz i diddnt save my last one)


//////i am still learning how to script. please dont call me a noob or anything,
//////any help would be appreciated.
//////most likely errors to happen:invaild parameters, Unexpected end of file.
//////i dont want to continuously make auto login scripts, just because i'm
//////still learning, but when i read more from a website, i might be able
//////to make an auto walker or something. anyway, lets get on with my crap.

var
user,pass:string;

Begin
user:=Readln('What is your Username?');
pass:=Readln('Now, what is your password?');
Writeln('you have 3 seconds to move to the client!');
wait(3000);
movemouse(444,283);
clickmouse;
Sendkeys(user);
sendkeys(chr(13));
sendkeys(pass);
movemouse(313,316)
clickmouse;
End.

XxKanexX

2006-04-02 08:15:41

Post the line data.

ub3r |<1||3r*1337*

2006-04-02 09:13:43

if you diddnt read my previous post, here it is


//////i am still learning how to script. please dont call me a noob or anything,
//////any help would be appreciated.
//////most likely errors to happen:invaild parameters, Unexpected end of file.
//////i dont want to continuously make auto login scripts, just because i'm
//////still learning, but when i read more from a website, i might be able
//////to make an auto walker or something. anyway, lets get on with my crap.

var
user,pass:string;

Begin
user:=Readln('What is your Username?');
pass:=Readln('Now, what is your password?');
Writeln('you have 3 seconds to move to the client!');
wait(3000);
movemouse(444,283);
clickmouse;
Sendkeys(user);
sendkeys(chr(13));
sendkeys(pass);
movemouse(313,316)
clickmouse;
End

XxKanexX

2006-04-02 09:44:51

Invalid Parametres:

From: Script

Line 17: clickmouse;
Line 22: clickmouse;


ClickMouse(x, y, left);

This is just like movemouse.

x and y are where to move. And if left is true it will left click, if its false it will right click.

Example:
ClickMouse(20, 20, true);

Will click on co-ordinates 20, 20 with the left click.

Example:
ClickMouse(50, 50, false);

Will click on co-ordinates 50, 50 with a right click. :)

Unexpected end of file:
From: Script

Line 23: End


Ends end in a full stop:

end.

If in a procedure or function, they end in a semi colon:

end;
:)

ub3r |<1||3r*1337*

2006-04-02 10:09:58

thank you so much!

now i'm working on an RS walker thank you! thank you!thank you!


now i need help with auto colour finding procedures

JLewis

2006-04-02 15:09:13

To Find Colors use one of these for begginers:

FindColor(x,y:integer;color,xs,ys,xe,ye:integer) : Boolean;
FindColorSpiral(x,y:integer;color,xs,ys,xe,ye:integer) : Boolean;

Now this is how to use them\

x and y are integers and are the x coordinate and the y coordinate that you want the function to return.

color is the color of the object you want to find which can be found by using the eyedropper

xs,ys,xe,ye is the area in which to search for the color

starting with the top left corner to the bottom right corner.

Example:

FindColor(x,y,0,1,1,12,12)

Hope that helps with your next script
:p

ub3r |<1||3r*1337*

2006-04-02 15:51:44

thanks, but i just dont get why i get an invaild parameter error…

The Prince of Randomness?

2006-04-02 15:56:43

You need to tell where to put ClickMouse.
Clickmouse is like MoveMouse.
You go like this

ClickMouse(50,50,True);

50,50 for where you want to click it
True if you want a right click
False if you want a left click.

ub3r |<1||3r*1337*

2006-04-02 16:13:27

ok, i'll try that, cuz i put like, movemousesmooth(x,y)then wait(500)then clickmouse(True) and that.


EDIT: i just noticed that it said, invaild number of parameters, is this different?

EDIT: and for the'getcolor' function, how do you save the color or give the color a const name?

XxKanexX

2006-04-02 18:00:27

From: ub3r |<1||3r
ok, i'll try that, cuz i put like, movemousesmooth(x,y)then wait(500)then clickmouse(True) and that.


EDIT: i just noticed that it said, invaild number of parameters, is this different?

EDIT: and for the'getcolor' function, how do you save the color or give the color a const name?


var
i: integer;
begin
i:= getcolor(2, 2);
Writeln(inttostr(i));
end.

and make sure for click mouse you have:


ClickMouse(x, y, Left);
all 3 parametres. It's just like movemouse but with that click on the end.

MoveMouse(x, y);
ClickMouse(x, y, true);

So you would do:

MoveMouse(50, 50);
ClickMouse(50, 50, true);
That would move and left click on 50, 50.

ub3r |<1||3r*1337*

2006-04-03 16:45:32

ok, thanks. i'm going to make a al-kharid silk buyer now. thank you all for your help!

Jagex_Fagex

2006-04-03 18:06:04

invalid number of parameters, means you havent got all the parameters in there, so:

ClickMouse(x, y);
would get you that error, you need all 3 parts.
ClickMouse(x, y, true);

ub3r |<1||3r*1337*

2006-04-04 18:26:20

wow, you guys are really helpful! i should put all of you that helped on my credits list:)


EDIT: lol, sorry, can someone tell me how to get the mouse to click on colours?

Jagex_Fagex

2006-04-04 19:13:51

well you could use findcolor

if(findColor(x,y,color,xs,ys,xe,ye)

x , y is the co-ords to look at, (You can just leave iit as x and y, color is the color to look for,

and xs, ys, xe, ye is the box co ords


xs ys---------------
| |
| |
----------------xe, ye

so you would say something like

if(findColor(x, y, 12345, 123, 45, 978, 72)then
begin
GetMousePos(x, y); // saves the co-ords of the colors in x, y
wait(50)
Mouse(x, y, 1, 1, true); // srl function you could also use MoveMouse and ClickMouse

hope it helped

ub3r |<1||3r*1337*

2006-04-04 19:18:40

thank you, i have nearly completed my al-kharid silk buyer now. it will almost be released


EDIT: how do you get the mouse to click on 'use-quickly bank booth'?

EDIT: and, when the script runs and goes to the seller, it just goes right passed him and does the talking script. i think i messed up on the find color procedures

EDIT: ok, this is my script so far… you can change the script if you like, but dont show it to me. i want to just know WTF IS GOING ON WITH IT! and how to fix it. and what procedures to use.

/////here is a silk buyer for all you members!
////no anti randoms though.... still in learning!
////i dont really have stop procedures


{start from the bank in the most northern area}
{face your mini map as north as possible and go to the middle bankbooth
dont put run on, and put your money on the first slot!}

{WARNING: will repeat and repeat until you stop it manually!}

var
x,y,a,b,c,d,e,f:integer;


Const
silksymbol= 6100369 ; {the silk symbol where the silk seller is}
banksymbol= 5497845 ; {the bank symbol}
sellersuit= 12282556 ; {the silk sellers suit}
BankBooth= 0000000 ; {the very dark grey of the bank booth}
//////dont modify anymore//////

procedure movetosilk;
Begin
clickmouse(691,27,True)
wait(14000)
clickmouse(682,20,True)
wait(13000)
findcolor(x,y,silksymbol,602,30,599,112)
Begin
Getmousepos(x,y)
wait(50)
clickMouse(x,y,true)
wait(10000)
End;
End;

procedure buysilk;
Begin
findcolor(a,b,sellersuit,6,8,509,7)
Begin
Getmousepos(a,b)
wait(50)
clickmouse(a,b,True)
wait(5000)
clickmouse(265,442,True)
wait(2000)
clickmouse(258,392,True)
wait(2000)
clickmouse(183,443,True)
wait(2000)
clickmouse(306,449,True)
wait(2000)
clickmouse(254,428,True)
wait(2000)
clickmouse(211,440,True)
wait(2000)
clickmouse(306,450,True)
wait(2000)
End;
End;

procedure gotobank;
Begin
clickmouse(614,127,True)
wait(14000)
clickmouse(616,143,True)
wait(14000)
clickmouse(619,116,True)
wait(14000)
findcolor(c,d,banksymbol,590,115,647,18)
Begin
Getmousepos(c,d)
wait(50)
clickmouse(c,d,True)
wait(14000)
End;
End;


Begin
Repeat
movetosilk;
buysilk;
gotobank;
Until(false)
End.