PDA

View Full Version : A brief lesson on fixing annoying errors :P



Pages : [1] 2

JAD
02-27-2007, 03:22 AM
Added a few more errors to help out all my fellow scripters :) enjoy.

well in this tutorial i will go over fixing some of the most common errors, and hopefully explain good enough how to fix them :P well here we go:

Note: all errors can be caused on the line it says the error is on or the line of code above (not counting comments, so if you have comments above, it may be caused by
the first line of code above it) Usually they will not occur anywhere else (not counting access violation, include doesn't exist...etc, the ones that don't tell you a line)



Error 1: Close round expected in script



Solution: Count your parenthesis on the line which the error occurs. for

example: if (FindColorSpiralTolerance(x, y, RockColor, 0, 0, 249, 179, Tol) then

see whats wrong with that? you have 2 ( ('s but only 1 ) to close it. you'd need to put 2 at the end of that like this:

if (FindColorSpiralTolerance(x, y, RockColor, 0, 0, 249, 179, Tol)) then

OK so now i hope you got that, Moving on..





Error 2: Include file C:\Program Files\SCAR 2.03\includes\SRL/SRL.scar does not exist. (or something like that)



Solution: this is the biggest error of all time. all you need to do for this is read the tutorial for installing SRL in the Install SRL forum. Moving on..





Error 3: Semicolon (';') expected in script



Solution: this used to happen to me A LOT when i didn't put a ";" after my variables. just remember to do so. You will also get this when you forget to put a ";" after your procedure/function names. Moving on..






Error 4: Unknown identifier 'AntBan' in script (or something like that)



Solution: this means that you did either did not type something write, you called a procedure that does not exist, you called for a variable that does not exist or you did no include an include, and call for it to setup at end of script (example if you needed to setup SRL in the main loop you need SetupSRL; in script and the include after program name)
so if this happens just check what either what variable you used, usually you just spelled it wrong above where you declared it. check spelling of it. check procedure name and check name of procedure you called for. Moving on..






Error 5: Duplicate Identifier i in script (or something like that)



Solution: to fix this i used x for an example. lets say you used i as your variable, then you made a procedure/function called i. this would not work because i is already used as a variable in the script, so you cannot name that as a procedure. So pretty much, you can't name 2 things the same thing, every name for variable/functions/procedures/constants...etc. has to be different.

Now, if there's a variable or a procedure in SRL and you have SRL included in your script, if you try to call a procedure/function something which's name is already used in SRL, you will get a duplicated identifier with that. So you can't make a procedure named this in your script if you're including SRL:


procedure Mouse;
begin
if(FindColor(x,y,12345,123,123,123,123))then
ClickMouse(x,y,true);
end;


If you included SRL, that would give you an error because Mouse is already a procedure in SRL. Hope you got that :) Moving on..






Error 6: Identifier expected in script.



Solution: count your begins and ends in your script, and make sure for each begin, you have an "end;" also make sure for each repeat you have an until. Moving on..






Error 7: 'BEGIN' expected in script.



Solution: make sure you have a begin at the beginning of your procedure.





Error 8: Invalid number of parameters in script.



Solution: this is ussually caused if you put too many numbers, parenthesis and things like that in script. if you put MMouse(x,y,0,0,0,) it would probably say invalid number of parameters. so just check whats needed in the command, and if theres anything extra thats not needed.







Error 9: Access violation.

Solution: Access violation usually always happens when somebody doesn't call for setupSRL; in there main loop of script (if your include is {.include SRL/SRL.scar}..) so heres what would be wrong:
Example:

program WhatEver;
{.include SRL/SRL.scar}
procedure Whatever2;
begin
//code here..
end;
begin //main loop.
Whatever2;
end.


See. now that would be wrong because you don't have SetupSRL; in your main loop. remember when using SetupSRL; you need it to be pretty much the first thing in your main loop, before any autoing. Heres a working example:

program WhatEver;
{.include SRL/SRL.scar}
procedure Whatever2;
begin
//code here..
end;
begin //main loop.
SetupSRL; //heres why it works now :D
Whatever2;
end.


The other most common way people get this error is calling for a bitmap when you didn't declare it. Lets say your script is something like this:

program Whatever;

var TheBitmap, x,y: Integer;

procedure LoadBitmaps;
begin

TheBitmap := BitmapFromString//And then the rest of your bitmap of course...

end;

procedure ClickTheBitmap;
begin
if(FindBitmap(TheBitmap,x,y))then
begin
wait(100+random(100));
Mouse(x,y,0,0,true);
end;
end;

begin
ClickTheBitmap;
end.


Now, that would cause an error! Do you know why? Because you didn't declare the LoadBitmaps procedure in the main loop as many people fail to do. So here is how it would look correctly:


program Whatever;

var TheBitmap, x,y: Integer;

procedure LoadBitmaps;
begin

TheBitmap := BitmapFromString//And then the rest of your bitmap of course...

end;

procedure ClickTheBitmap;
begin
if(FindBitmap(TheBitmap,x,y))then
begin
wait(100+random(100));
Mouse(x,y,0,0,true);
end;
end;

begin
LoadBitmaps; //This is what fixed the error!
ClickTheBitmap;
end.









Error 10: Out of range error.



Solution:
This is most commonly caused by not setting your players right in the player arrays. When you set the number of players, you are setting the number of slots that there are players for, ACTIVE OR NOT! so if you have 2 users active, but there are 6 slots, then you still have the how many players as 6.






Error 11: Assignment expected in script.



Solution:
This error happened to me a few days ago when I was scripting and adding the progress report. It happened to me when I had in my banking procedure for my chopper:
Example:

LoadsNum=LoadsNum+1;

that would be in correct and you would get an error. you need to add a ":" like so:

LoadsNum:=LoadsNum+1;


well thats my tut for now, if i think of any more errors I will edit this. if you have any errors that i didn't post, and you think i should please post below. don't forget to plus rep me if this was helpful :) thanks for reading this, hoped i helped you some. laterz for now.





Error 12: Close round expected in script



Solution: This just means that you are missing a/some ")"[s] for each "(" you have. So this:


procedure Whatever;
begin
if(FindColor(x,y,1321235,MMX1,MMY1,MMX2,MMY2)then
ClickMouse(x,y,true);
end;


wouldn't work because you are missing a ")" in the FindColor. So just count your "(" 's and make sure that for each "(" you have, you have a ")" to close it. Moving on..





Error 13: comma "," expected in script



Solution: This could actually mean that you are missing a parenthesis/close round somewhere, and can be caused by other problems that you could fix above. But something like:


if(FindColor(x,y,1234123,MMX1,MMY1,MMX2 MMY2))then
ClickMouse(x,y,true);


wouldn't work. Because the MMX2 MMY2 doesn't have a comma between it. Just make sure you have that, and it could be caused by the line above not having a closed round or something. Moving on..





Error 14: 'THEN' expected in script



Solution: Simply means you don't have a "then" in something that has an if. For example:


procedure Whatever;
begin
if(FindColor(x,y,1235123,MMX1,MMY1,MMX2,MMY2))
ClickMouse(x,y,true);
if(InChat('JAD is awesome!'))
Writeln('JAD is awesome was in the chat!');
end;


That wouldn't work because you don't have any then's for lines that have an if. So it's pretty much saying, if it finds the color (or whatever), then it does what? What does it do if it finds the color? Just put a then after it to fix that. Moving on..





Error 15: String error in script



Solution: Means you forgot to close an opening "'" with a closing "'" So this:


procedure Whatever;
begin
Writeln('JAD is sooo awesome!);
if(InChat('hi there))then
Writeln('JAD is sooooooo awesome!);
end;

wouldn't work. All 3 of the commands wouldn't work because you didn't close the opening "'" with a closing "'". Moving on..





Error 16: Syntax error in script



Solution: Most-likely means you didn't type something right. Just make sure all the parameters and everything are correct. This would give you a syntax error:


procedure Whatever;
var J: Integer;
begin
J := 5;
Writeln(J);
end;


That wouldn't work because J isn't a string, and you didn't use IntToStr in that Writeln. It would also happen when your using something like GetTextAtEx and using an integer where there is supposed to be a string. Moving on..

HarryJames
03-01-2007, 11:08 PM
thats is actually very handy, cheers Jad

opcon
03-02-2007, 09:16 AM
yeah nice work JAD

JAD
03-02-2007, 04:22 PM
thank you guys :)

pwnaz0r
03-02-2007, 07:44 PM
Isnt this like your 3rd tut :p nice work bro.(You did have the day off tho :))

JAD
03-02-2007, 08:04 PM
if I get an idea for a tutorial, I just go for it, because I have all the time in the world :) I usually do spread them out though, this one was like 1 day off my things the beginner tuts dont teach you, then I made one after this one :p currently thinking of more ideas, then I'll write some more :)

3Garrett3
03-03-2007, 12:50 AM
Do you know how to get rid of Syntax errors?

Meanage
03-03-2007, 12:59 AM
nice tut, i amagine this will be very helpful, i hate annoying errors. also, you could add something about not having enough ends at the end of procuedures

JAD
03-03-2007, 01:13 AM
nice tut, i amagine this will be very helpful, i hate annoying errors. also, you could add something about not having enough ends at the end of procuedures


Error 6: Identifier expected in script. that just says count your begins and ends.

@garret, thanks for the suggestion. I'll be sure to add that!

StK Squenc
03-03-2007, 01:49 AM
here's another one that u dont have up thier....

I need help with this....editing someones script:D

Line 937: [Error] (20638:47): Invalid number of parameters in script

Heres the line

if(GetChatMessage(Players[CurrentPlayer].Name)) or (GetChatMessage(Players[CurrentPlayer].Nick))then

JAD add me on msn. CLick the colorful butterfly Next to longetivy. or below where i live i dont know where its at lol

YoHoJo
03-03-2007, 04:47 AM
I believe the procedure is now called
GetChatMsg


you may also use:
function IsChatMessage(s: String): Boolean;
function GetNewChatMsg: String;
function GetLastChatText(var chat: String): Boolean;
function ClickNpcChatText(txt: String): Boolean;
function FindNpcChatText(txt: String): Boolean;

:p =)

the flea
03-05-2007, 07:05 PM
do you know how to sort this out?
Line 84: [Error] (17745:1): Type mismatch in script C:\Program Files\SCAR 2.03\Scripts\******.scar (i edited name because its not released yet.

line 84 is :
writeln('buried a full inv of bones')

diamondhero6
03-17-2007, 01:45 AM
it in the line above it usually
so look and see if theres anything wrong in line 83

Boreas
03-17-2007, 02:46 AM
Actually the line below it, 85. You didn't have ; on 84, so SCAR thinks that the line after it (and all lines until it hits a ; ) is 84.

JAD
03-18-2007, 02:58 AM
WOW! thats amazing this tutorial got stickied over my other tuts which I think were better :p but I'm not going to complain :D thanks whoever stickied this :p

MJJ
03-19-2007, 12:09 AM
:D thanks for this JAD :D

good job you know what your doing :p

JAD
03-19-2007, 12:46 AM
Ty :d

aran armath
03-19-2007, 04:41 PM
I keep getting this message

Line 871: [Error] (6737:12): Unknown identifier 'FindColorCircleD' in script C:\Program Files\SCAR 2.03\includes\srl\srl\core\Color.scar

here is what line 871 looks like in color.scar

Result := (FindColorCircleD(x, y, color, radius, MidPointx, MidPointy, 0));

JAD
03-19-2007, 05:19 PM
You need to copy the plug ins from your SRL folder to your scar plugins folder I'm 99.9% sure :)

aran armath
03-19-2007, 05:39 PM
which SRL folder? Im so confused

JAD
03-20-2007, 12:07 AM
the plug ins folder :p

~alex~
03-31-2007, 10:06 AM
Any help on an Access violation?

stein3
03-31-2007, 12:12 PM
thanks so much! That helped but theres another one i get now :(

comma ',' expected

(it expects it to be M,Mouse)
wtf?

JAD
03-31-2007, 02:57 PM
@nate, Could you give me the line above where it says the error, the line it says the error on and the line below it? I could help you then :p

@alex, Thanks, I'll add that. forgot about that one. read updated version.

belgin fish
04-09-2007, 11:47 PM
ok JAD This Is Bothering Me

Line 61: [Error] (18102:1): comma (',') expected in script

60-wait(10+random(3)
61-FindTalk;
62-if(FindFight) then

the numbers are just the lines 60, 61, 62

JAD
04-10-2007, 01:35 AM
wait(10+random(3)

you have 2 (('s right? How many )'s do you have to close it off? :) Just make it:
wait(10+random(3)) and it will work.

Synthroids
04-10-2007, 11:22 AM
Man, I've been stuck with that runtime error for just under an hour now. You're a life saver :P

Well written, great guide.

JAD
04-10-2007, 02:24 PM
Thanks a lot synth! Glad to be of service to a fellow scripter :D

kooldude
04-16-2007, 08:53 PM
I like this, helped me ALOT!!! o yea i got this error though Line 12: [Error] (17347:40): Type mismatch in script, think it was awnsered by boreas ill check

JAD
04-16-2007, 09:38 PM
Thanks a lot! :D

Deni_mulic
04-25-2007, 02:06 PM
OMFG I LOVE U
It took me 2 hours, but thanks to this lesson, I've fixed my powerminer script with full anti randoms and multi user capability :)
*hug*

JAD
04-25-2007, 03:53 PM
OMFG I LOVE U
It took me 2 hours, but thanks to this lesson, I've fixed my powerminer script with full anti randoms and multi user capability :)
*hug*

Lol, thanks for posting :D

Glad to be of help to a fellow scripter, can't wait to see your script! Feel free to ask me any questions on msn or pm me (pming me is more reliable because I'm not always on msn).

vinzone
04-26-2007, 12:19 AM
I really need help with this
Line 871: [Error] (6737:12): Unknown identifier 'FindColorCircleD' in script C:\Program Files\SCAR 2.03\includes\srl\srl\core\Color.scar

Mjordan
04-26-2007, 12:48 AM
I really need help with this
Line 871: [Error] (6737:12): Unknown identifier 'FindColorCircleD' in script C:\Program Files\SCAR 2.03\includes\srl\srl\core\Color.scar

You didn't download SRL correctly. You need to put your plugins in the plugin folder. If you don't know what that means, just redownload SRL ;)

vinzone
04-26-2007, 06:48 PM
You didn't download SRL correctly. You need to put your plugins in the plugin folder. If you don't know what that means, just redownload SRL ;)

yeah thanks just redownloaded and reinstalled and it works fine now

wogboy12
05-23-2007, 09:39 AM
thx alot nice work

JAD
05-23-2007, 02:54 PM
thx alot nice work

thanks a lot! :D

skibby
05-25-2007, 01:50 PM
Nice work

JAD
05-25-2007, 02:34 PM
Nice work

Thanks! :D

Fearlesssss
05-26-2007, 11:22 AM
I have another error maybe you know what it is: Line 1: [Error] (1:1): Variable Expected in script D:\Documents and Settings...FallyAutoer.scar
Its so weird cuz I have set all my variables and stuff and I have 5 includes. If i remove 1 of them the error is gone but then it can't declare something else:confused:

JAD
05-26-2007, 03:33 PM
I have another error maybe you know what it is: Line 1: [Error] (1:1): Variable Expected in script D:\Documents and Settings...FallyAutoer.scar
Its so weird cuz I have set all my variables and stuff and I have 5 includes. If i remove 1 of them the error is gone but then it can't declare something else:confused:

Hmm... Can you please post the first like 10 lines of your script thats NOT comments if you have any?

I'll help you further then, and add it to my error list thanks!

JAD
05-30-2007, 03:23 PM
nice job:D

Thanks! :D

smoking brian1
05-31-2007, 06:42 PM
thx i been tryin for weeks how to use it now i can thx 2 u :D :D

JAD
05-31-2007, 10:07 PM
thx i been tryin for weeks how to use it now i can thx 2 u :D :D

Awesome! You mean trying to fix your own script errors or others? ;)

carlitox
06-01-2007, 04:23 AM
how can i solve bank problems, (ie oak anhiliator that never banks oaks, or secetcutter that never finds bank booth??))

JAD
06-01-2007, 03:22 PM
how can i solve bank problems, (ie oak anhiliator that never banks oaks, or secetcutter that never finds bank booth??))

This tutorial is for fixing Errors. Not for fixing script problems. Sorry, maybe give your problem on the thread saying whats wrong?

Tazzie 02
06-02-2007, 06:07 AM
I like this tut JAD. I come to it every time I encounter an error. I have an error...

Line 45: [Error] (18086:27): Invalid number of parameters in script C:\WINDOWS\Desktop\SCAR\Scripts\Scripts\Willow Cutter.scar

on line 45 it says...


if(IsUpTextMulti('Willow'))then

Please help me!
Tazzie

Bobarkinator
06-02-2007, 06:21 AM
IsUpTextMulti looks for 3 uptexts and you only have one, do this "IsUpTextMulti('illow','low','Willow');"

Tazzie 02
06-02-2007, 06:25 AM
OK. Thanks bobarkinator.

JAD
06-02-2007, 02:22 PM
I like this tut JAD. I come to it every time I encounter an error. I have an error...


on line 45 it says...



Please help me!
Tazzie

Thanks :) I think it saves a lot of posts in the scripting help section from some newer scripters just looking at this.. :p

RudeBoiAlex
06-02-2007, 10:02 PM
JAD u helped us all lol

JAD
06-02-2007, 11:49 PM
JAD u helped us all lol

Lol, good ;)

Tazzie 02
06-03-2007, 12:57 AM
Ummm... I kind of got another error with a progress report. Error is

Line 72: [Error] (18113:1): Invalid number of parameters in script C:\WINDOWS\...
And line 72 is

Writeln('+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+')

Thanks.

Tazzie

JAD
06-03-2007, 01:00 AM
Ummm... I kind of got another error with a progress report. Error is

And line 72 is


Thanks.

Tazzie

Hmm.. Interesting. Could you please post the whole script? Or at least that whole procedure? I'll see if I can fix it (Probably can).

dialeyj2
06-08-2007, 07:32 PM
idk what to do with this error:

Line 14: [Error] (14:4): period ('.') expected in script

this is my entire script:

program KingOfButtons;
var x,y:Integer;
const ButtonColor=3158271;
Procedure StartGame;
begin
MoveMouse(595,68);
ClickMouse(595,68,true);
MoveMouse(543,29);
ClickMouse(543,29,true);
end;
begin
StartGame;
end;
begin
if(FindColor(x,y,ButtonColor,416,-387,965,12))then
begin
MoveMouse(x,y);
ClickMouse(x,y,true);
end;
end.

It's one of my first scripts and idk wut to do. plz help!

EDIT: ok ty

JAD
06-08-2007, 07:48 PM
this here:

begin
StartGame;
end;

isn't a procedure. You make it look like it's your main loop starting with a begin and it's supposed to end with a "end.". Change your loop around or make extra procedures to try to fix that.

Hope you get what I mean :)

drnewheart
06-10-2007, 10:55 PM
Thanks I fixed soooooo many scripts now ZOMG i can't express my gratitude. LOL i sound corny.

JAD
06-11-2007, 12:53 AM
Thanks I fixed soooooo many scripts now ZOMG i can't express my gratitude. LOL i sound corny.

Lol. Glad to have helped a fellow scripter ;)

Maxine
06-16-2007, 03:18 PM
i was so lost and fighting with Error 5, until yuor tut. thanks youve saved my day twice:D (first with that shop inventory full thingy)

JAD
06-16-2007, 03:27 PM
i was so lost and fighting with Error 5, until yuor tut. thanks youve saved my day twice:D (first with that shop inventory full thingy)

Lol, good to hear! Glad this tut has help some people :)

stay bombin
06-16-2007, 11:19 PM
thank you very much sir

JAD
06-17-2007, 02:18 PM
thank you very much sir

No problem. I love it when people call me sir when I'm only 13 lol.

x13om13e12x
06-18-2007, 01:35 AM
These are some of the errors i find

comma (',') expected in script
which means yoru missing a comma


'THEN' expected in script
which means that you didnt type 'then' after an if statement...or you put a
semicolon ";" in the sentence before you typed then.


String error in script
which means that you left a ' out when using them ex.

Writeln('I am happy)


Syntax error in script
Which I think means that you didnt use the command or function parameters right. ex. typing a number value where there should be a string

JAD
06-18-2007, 03:07 AM
you could have errors

which means you didnt count the Parentases


which means yoru missing a comma


which means that you didnt type 'then' after an if statement...or you put a
semicolon ";" in the sentence before you typed then.


which means that you left a ' out when using them ex.



Which I think means that you didnt use the command or function right.

Thank you very much! This has helped me a lot in improving my tutorial. I never get many errors like that anymore because I know how things should be, but I got them all the time when I was new to scripting and forgot about them ;)

But this has added lots of new errors to my tutorial, thanks!

randy marsh
06-18-2007, 03:09 AM
No problem. I love it when people call me sir when I'm only 13 lol.



One clever 13 year old! :D

Wish i code like you and im 21!

x13om13e12x
06-18-2007, 02:20 PM
Jad I just finished my new cow hide script. But i have an identifier error, and i checked through all the repeats begins untils and ends like 10 times, but nothing is wrong. Here is the procedure.Procedure BankingHides; //this is the line that the identifier error is.
begin
CowHideDTM := DTMFromString('78DA6314626060E06740013BD7AD63F80FA 41' +
'981F83F10304A0119AC0C6880118904D2D240428A801A903D 3204' +
'D4B0030971026AD880040F7E35009E8D07F2');
wait(100 + random(135))
for A:= 3 to 8 do
begin
FindBitmapToleranceIn(BankBMP(x,y,MMX1,MMY1,MMX2,M MY2,A);
If(FindBitmapToleranceIn(BankBMP(x,y,MMX1,MMY1,MMX 2,MMY2,A))) then
begin
break;
end;
end;
MMouse(x,y-17,0,0);
Mouse(x,y-17,0,0,true);
flag;
wait(387 + random(154));
repeat
FindColorTolerance(x,y,8096403,MSX1,MSY1,MSX2,MSY2 ,3);
if(not(FindColorTolerance(x,y,8096403,MSX1,MSY1,MS X2,MSY2,3)))then
begin
Tries:=0;
repeat
Wait(400 + random(50));
Tries := Tries + 1;
If Tries=20 then
Begin
Writeln('Cant find Bank...next player');
NextPlayer(false);
end;
until FindColorTolerance(x,y,8096403,MSX1,MSY1,MSX2,MSY2 ,3);
end;
until FindColorTolerance(x,y,8096403,MSX1,MSY1,MSX2,MSY2 ,3);
MMouse(x,y,2,2,true);
if(not(IsUpText('ank booth')))
begin
repeat
FindColorTolerance(x,y,8096403,MSX1,MSY1,MSX2,MSY2 ,3);
if(not(FindColorTolerance(x,y,8096403,MSX1,MSY1,MS X2,MSY2,3))) then
begin
Tries:=0;
repeat
Wait(400 + random(50));
Tries := Tries + 1;
If Tries=20 then
Begin
Writeln('Cant find Bank');
NextPlayer(false);
end;
until FindColorTolerance(x,y,8096403,MSX1,MSY1,MSX2,MSY2 ,3);
end;
until IsUpText('ank booth',true)
end;
MMouse(x,y,2,2);
Mouse(x,y,2,2,false);
ChooseOption(x,y,'Use-quickly');
if (FindDTM(CowHideDTM,x,y,558,308,740,463));
begin
Mouse(x,y,2,2,false);
ChooseOption(x,y,'All');
end;
CloseBank;
Loads2:= Loads2 + 1
end;

JAD
06-18-2007, 06:43 PM
Jad I just finished my new cow hide script. But i have an identifier error, and i checked through all the repeats begins untils and ends like 10 times, but nothing is wrong. Here is the procedure.Procedure BankingHides; //this is the line that the identifier error is.
begin
CowHideDTM := DTMFromString('78DA6314626060E06740013BD7AD63F80FA 41' +
'981F83F10304A0119AC0C6880118904D2D240428A801A903D 3204' +
'D4B0030971026AD880040F7E35009E8D07F2');
wait(100 + random(135))
for A:= 3 to 8 do
begin
FindBitmapToleranceIn(BankBMP(x,y,MMX1,MMY1,MMX2,M MY2,A);
If(FindBitmapToleranceIn(BankBMP(x,y,MMX1,MMY1,MMX 2,MMY2,A))) then
begin
break;
end;
end;
MMouse(x,y-17,0,0);
Mouse(x,y-17,0,0,true);
flag;
wait(387 + random(154));
repeat
FindColorTolerance(x,y,8096403,MSX1,MSY1,MSX2,MSY2 ,3);
if(not(FindColorTolerance(x,y,8096403,MSX1,MSY1,MS X2,MSY2,3)))then
begin
Tries:=0;
repeat
Wait(400 + random(50));
Tries := Tries + 1;
If Tries=20 then
Begin
Writeln('Cant find Bank...next player');
NextPlayer(false);
end;
until FindColorTolerance(x,y,8096403,MSX1,MSY1,MSX2,MSY2 ,3);
end;
until FindColorTolerance(x,y,8096403,MSX1,MSY1,MSX2,MSY2 ,3);
MMouse(x,y,2,2,true);
if(not(IsUpText('ank booth')))
begin
repeat
FindColorTolerance(x,y,8096403,MSX1,MSY1,MSX2,MSY2 ,3);
if(not(FindColorTolerance(x,y,8096403,MSX1,MSY1,MS X2,MSY2,3))) then
begin
Tries:=0;
repeat
Wait(400 + random(50));
Tries := Tries + 1;
If Tries=20 then
Begin
Writeln('Cant find Bank');
NextPlayer(false);
end;
until FindColorTolerance(x,y,8096403,MSX1,MSY1,MSX2,MSY2 ,3);
end;
until IsUpText('ank booth',true)
end;
MMouse(x,y,2,2);
Mouse(x,y,2,2,false);
ChooseOption(x,y,'Use-quickly');
if (FindDTM(CowHideDTM,x,y,558,308,740,463));
begin
Mouse(x,y,2,2,false);
ChooseOption(x,y,'All');
end;
CloseBank;
Loads2:= Loads2 + 1
end;


Count your begins/repeats and ends/untils from the procedure above. That is most likely the problem. If not, just give me the whole procedure above that to and I can probably fix it :)

x13om13e12x
06-18-2007, 08:49 PM
The previous procedure is very long, and i don't feel like exposing most o fmy script, so im gona send it to you in a message.
Edit: Nvm i read through the procedure and I found alot of errors, i screwed up on some standards and thought i had ended the begin before going on cause i was already at the same spaces from the end. and ty for the help

JAD
06-18-2007, 10:30 PM
The previous procedure is very long, and i don't feel like exposing most o fmy script, so im gona send it to you in a message.
Edit: Nvm i read through the procedure and I found alot of errors, i screwed up on some standards and thought i had ended the begin before going on cause i was already at the same spaces from the end. and ty for the help

np :) I had a feeling that that was what happened :p

hardcoregek9
06-20-2007, 07:01 PM
i m using the willow chopper and it keeps saying error detecting compas angle how do i solve it at what bank booth do i need to stand?:confused:

JAD
06-20-2007, 07:05 PM
i m using the willow chopper and it keeps saying error detecting compas angle how do i solve it at what bank booth do i need to stand?:confused:

what willow chopper? My edgevil willow chopper? If your talking about that, this is the wrong section... :p

But that script hasn't been updated by me in forever, and I was pretty new to scripting when I made that.. And I don't plan on updating it, but I may ;)

If that wasn't what you were talking about, please tell me what you meant by your post.

zenma
06-30-2007, 09:17 AM
nice guide jad, lol this helped me with like 5 errors in my script except for one that i cant figure out i think it should work but it says "line 422: [Error] (14832:10): 'THEN' expected in script" heres part of the script if u wanna help

Procedure loginme1;
begin;
DeclarePlayers;
wait(500 - random(250))
LoginPlayer;
wait(19000 + random(4000) - random(4000));
if NoNet :=true then
FindNet;
end;

what did i do wrong ( besides the functions and procedures wouldnt work cause there before that in whole script)

JAD
06-30-2007, 06:02 PM
You have a ":" in your NoNet = thing :p

If your checking a result, like if This = this then or whatever, then you just use a "=" sign. If your changing a variable, like if(InChat('JAD is awesome!'))then OurVariable := 10293765; you'd use a ":" like so :)

So just take out that ":" and you should be good.

And thanks a lot :)

zenma
07-01-2007, 05:54 AM
oh ok thanks w00t jad is rad :cool:

SKy Scripter
07-01-2007, 06:51 AM
omg! thanks

i was wondering why i was getting a ERROR

Program New;
begin
Writeln( hello World);
end;


didnt know there was spose to be 'hello world' and "end."
thanks Jad...
lol jk im bored.. nice tut maybe people will stop buging me... gah..
edit : although i dont think that will happen lol...

JAD
07-01-2007, 02:22 PM
omg! thanks

i was wondering why i was getting a ERROR

Program New;
begin
Writeln( hello World);
end;


didnt know there was spose to be 'hello world' and "end."
thanks Jad...
lol jk im bored.. nice tut maybe people will stop buging me... gah..
edit : although i dont think that will happen lol...

Thanks! :) And the funny thing is, before I wrote this tut (when I just joined), there were sooo many common errors being posted in the scripting help section like close round expected....etc. and now we barely ever get those posts for simple errors.

Thanks everyone :)

koolkarpet
07-01-2007, 08:48 PM
Thank You so much now my script is working!!!

JAD
07-01-2007, 08:55 PM
Thank You so much now my script is working!!!

np, awesome and glad to help! :)

sheetomg
07-02-2007, 09:58 AM
what about mismatch error?

JAD
07-02-2007, 10:15 PM
what about mismatch error?

I believe I added Type Mismatch error, didn't I? ;)

sheetomg
07-03-2007, 05:50 AM
I believe I added Type Mismatch error, didn't I?

ahh must have missed it, great tut btw

JAD
07-03-2007, 06:33 PM
ahh must have missed it, great tut btw

Thanks :)

JAD
07-06-2007, 10:57 PM
Any idea what could be causing this problem?
Nice tut by the way.
Thanks.

Thanks, and np :p

And 2 things could have caused that:

1: You didn't declare Loads as a variable or a constant, whichever you want to use it for :p

2: You declared it as a variable after a procedure name and before the begin, making it a non-global variable, so it can't be used anywhere else except that procedure/function, and you are calling it in a different one.


1 of those 2 should solve it, most-likely the first one. If they don't, post your script and I'll fix it :)

sukomabawls
07-12-2007, 05:56 AM
[B]I SUCK AT SCRIPTING!!!!!![B] you guide helped though, thanks!

sukomabawls
07-13-2007, 02:42 AM
i get this message and i dont have a clue. " line 58 error indenifier expected in script" but heres line 58...
Procedure Heal;
so wtf is up?

EDIT: Sorry for the double post, i didnt know i posted last :p

sum1uallno
07-15-2007, 12:18 AM
Very Cool! I likes. Can you update with side by side examples for imbosols like me. JK thanks:D

JAD
07-15-2007, 12:37 AM
i get this message and i dont have a clue. " line 58 error indenifier expected in script" but heres line 58...
Procedure Heal;
so wtf is up?

EDIT: Sorry for the double post, i didnt know i posted last :p

Count the begins and ends above. Make sure for each begin you have an end..

Also, if above you have "var", and don't have any variables being declared by it, that may cause it to.

If that doesn't help may you please post the script, or at least the procedure above that line? Thanks!

maux
07-19-2007, 01:54 AM
allways when I try to run a fishing script I get the same anoying error which dont lets me play any fishing script
error: unknow identifier 'FindItemColor' in script C:/bah/blah/blah/blah/fishing.scar
I was searching for a answer but I didn't found any answer to that error :(

hamstring
07-20-2007, 07:28 PM
thx this is really good it will solve alot of problems =]

oliver1205
07-21-2007, 01:22 AM
Thanks, even I didn't know a couple of those.

cathering_
07-26-2007, 11:00 PM
Add Type Mismatch in the tut :p

lamatime
07-27-2007, 02:26 PM
I am starting my first script! but i cant fix this syntax error :(
this is what i have so far

program WoodCutterSeller;
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/WoodCutting.scar}
var
lumbcheck: Integer;

procedure LumbCheckandtele;
begin
lumbcheck := BitmapFromString2(False, 'aF260E78DAA5945BAE8' +
'5200C45A704C8F35310E73FA46BD9897253CB11C5648794D2 6529' +
'4529A58D5787864394ABF150EFC9E2F6A6AED06A69AB7E25C D6D1' +
'EFD65D9484DB4A73FF67A439EC190251447BA6C648FB460DA AA4F' +
'0B29B8D99D96A0F3E5B3A76B6FD0A45B38FD97DCFEC111FD1 AE9F' +
'8748925E6C435A4A4AAB88ABDC1F97260047D42895BCAD580 85F9' +
'98A8C683B1B2CAB60644E62CE8529D9B620919211A88A0F42 C503' +
'05FE31AD3332263F15C7A624FE97596D5FFBFA4B6F8BD5A49 BFE4' +

if(FindBitmap(lumbcheck; x,y): False then

else
end;
begin
LumbCheckandtele
end.


I am using scar divi 3.11 with srl 3.8, when i compile i get this
Line 18: [Error] (14832:1): Syntax error in script C:\Program Files\SCAR 3.11\Scripts\wood cutter and seller.scar

stupedspam
07-27-2007, 02:32 PM
First use scar tags...

program WoodCutterSeller;
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/WoodCutting.scar}
var
lumbcheck: Integer;

procedure LumbCheckandtele;
begin
lumbcheck := BitmapFromString2(False, 'aF260E78DAA5945BAE8' +
'5200C45A704C8F35310E73FA46BD9897253CB11C5648794D2 6529' +
'4529A58D5787864394ABF150EFC9E2F6A6AED06A69AB7E25C D6D1' +
'EFD65D9484DB4A73FF67A439EC190251447BA6C648FB460DA AA4F' +
'0B29B8D99D96A0F3E5B3A76B6FD0A45B38FD97DCFEC111FD1 AE9F' +
'8748925E6C435A4A4AAB88ABDC1F97260047D42895BCAD580 85F9' +
'98A8C683B1B2CAB60644E62CE8529D9B620919211A88A0F42 C503' +
'05FE31AD3332263F15C7A624FE97596D5FFBFA4B6F8BD5A49 BFE4' +

if(FindBitmap(lumbcheck; x,y) then //Don't need to put Boolean...

else Exit; //Exit is better than end
begin
LumbCheckandtele
end.

It should work now :D
~Stupedspam

lamatime
07-27-2007, 04:48 PM
Line 18: [Error] (14832:1): Syntax error in script C:\Program Files\SCAR 3.11\Scripts\wood cutter and seller.scar

...didn't fix anything

JAD
07-27-2007, 07:37 PM
Line 18: [Error] (14832:1): Syntax error in script C:\Program Files\SCAR 3.11\Scripts\wood cutter and seller.scar

...didn't fix anything

It's because there is a + after the last line of the bitmap. There's also a problem in your bitmap... There is tons of errors in there. Try making a new bitmap.

lamatime
07-27-2007, 07:38 PM
ty JAD your the best

ill try

Edit: nothing wrong with bitmap, r you sure your using scar divi 3.11 with srl 3.8?

lamatime
07-27-2007, 07:52 PM
WOOT fixed it

All hail the mighty JAD

Thank you, you were right about the pus sign thing

your tut helped me on the others

thank you thank you thank you

JAD
07-27-2007, 08:23 PM
WOOT fixed it

All hail the mighty JAD

Thank you, you were right about the pus sign thing

your tut helped me on the others

thank you thank you thank you

np :D More then glad to help a fellow scripter out.

Macrosoft
07-28-2007, 08:21 PM
Thank you, very helpful!

GotNarced
07-31-2007, 11:20 PM
great tut, thx

dvdcrayola
08-15-2007, 04:38 AM
thanks i us this for reference all the time!

killer man 007
08-15-2007, 05:30 AM
Thank you, i now know what to do with the Errors i have been receiving. Thanks.

buck cakes
08-29-2007, 01:38 AM
tyvm been looking for something like this

nihao454
08-31-2007, 01:30 PM
yo jad, it doesn't fix anything when i put ' ' in string it keeps giving me errors

nihao454
08-31-2007, 03:38 PM
how about this unknown identifier dropto

gothicly2
09-03-2007, 12:30 AM
ooh, nice one really liked how it's set up and god for learning! You do good tuts!

valesar
09-03-2007, 03:50 AM
Another great tutorial, I'm sure I'll use this a lot to fix all those annoying errors that always pop up (I swear sometimes it just makes em up to annoy me)

SilentScripter
09-03-2007, 07:01 PM
Thxs Jad with the error help.:)

lordofdapoop
09-04-2007, 02:23 AM
This helped alot. =)

ultima2007
09-08-2007, 10:31 PM
This helped me out a lot, im trying to make a couple of beginning scripts
and I've gotten all these errors at least once lol

Derek-
09-12-2007, 01:20 AM
Nice Tut.
Hope you don't mind if I use a link to it in my form. =]

Zyt3x
09-12-2007, 02:22 PM
Could not call proc in line ** in script.

What causes this?? :?

ShowerThoughts
09-12-2007, 02:23 PM
must say nice bump:(

Toterache
09-14-2007, 02:08 PM
Here is one you might want to include: Unexpected end of file
Not sure how to solve it, maybe has something to do with too many ends?
EDIT: hehe, found the problem, i just had procedures, and I just tried to see if any errors were happening, and I ended it with "end.", even though i didn't get to what the program was supposed to do. :)

Fruity-Lo0py
09-14-2007, 08:02 PM
Thanks so MUCH!

BuuB
09-16-2007, 12:27 PM
Thanks for this. :)

Boonce
09-17-2007, 06:18 AM
Thanks great thread! It will help alot!

The3point14
09-22-2007, 09:04 PM
AHHH THIS IS MY BIBLE! I hate errors, and I get them all the time whether I am scripting or running one that I downloaded. Finally I can fix most of them and run it correctly.

Thanks!

PwNZoRNooB
09-22-2007, 10:03 PM
Heh, this is handy. Ctrl + D (bookmark) :)

Sean425
09-22-2007, 10:09 PM
VERY nice guide, it will help me a lot while I'm learning to script scar.
I'm sure it has helped many others as well! :)

Naum
09-23-2007, 10:06 AM
Try to see if you can get round this one JAD :p :
Type mismatch in script
It would be a real help if you could.
Thank-You
->{Nauman}<-

matviy
09-23-2007, 06:55 PM
WOW thanks. This is my error database now. If i have an error its always here with a fix, ty! >.<

matviy
09-23-2007, 07:01 PM
i never actually had this problem before, but great tut nonetheless!

grats
09-28-2007, 03:50 AM
hey thanks solved one of my errors ;) now i dont have to start a thread!

ojkid
09-30-2007, 01:02 AM
just helped me alot :D

s1thslay3r0
10-04-2007, 11:11 PM
i have one that says period expected in script what should i do for that

s1thslay3r0
10-04-2007, 11:12 PM
nevermind i fixed it gotta test now

Becks
10-04-2007, 11:35 PM
added this to favorites errors no more. thank you

tehkow
10-05-2007, 03:20 AM
another great one, gj :)

s1thslay3r0
10-05-2007, 07:55 PM
i got an access violation and put in SetupSRL; like u said but its still doing it

m3dtem
10-06-2007, 05:14 AM
exactly what i was looking for
thanks alot

glenn10245
10-13-2007, 06:57 AM
yo can someone of u help me with this if i try to start flax spinner script it runs but the there come error detecting compass angle

Rawr_Cabbage
10-14-2007, 09:46 PM
Ooooh, that's what duplicate identifiers are. I tried to make a drop all procedure a while back (just something simple to use when cleaning out my bank ;p) and didn't realize I named the procedure the same as the SRL, hah. Well, thanks, I know now.

theman55
10-15-2007, 12:57 AM
failed when compiling
line25: [error] (25:4) : uknown identifier 'loggedin' in the script c:/documents
and settings/drake mills/ my documents/runescape3/scar 3.12/ includes/srl/srl
/skill/woodcutting.scar

bloodlust 916
10-15-2007, 01:19 AM
umm i hav a problem with unknown identifier 'x' on line 82 here lines 81 to 88



begin
x := 0;
y := 0;
Xmid := 0;
Xmin := 0;
Xmax := 0;
NoMoreYellow := False;
if (FindColor(x, y, 65535, 10, 25, 511, 334)) and (not (FindColor(x, y, 65280, 220, 130, 290, 165))) then

please help if you can...

Zeta
10-17-2007, 11:18 PM
for the identifier exptected, you should also state that cases count as begins, because i forgot all about that and it really pissed me off <.<

Toterache
10-20-2007, 03:09 PM
First of all: Really nice script, saved me tons of time and anger, but right now I got an error that doesn't seem to be up there, and it pops-up every time i use {.include SRL\SRL.scar}.
It opens up a second tab named global.scar, and the this error comes up:
Line 32: [Error] (75:1): Duplicate identifier '' in script C:\Program Files\SCAR 3.06\includes\SRL/SRL/Core/Globals.scar

I really finally want to run my script, but this stupid errors doesn't allow me to. This same errors ocures on scripts i got from other players which include {.include SRL\SRL.scar}, how can I solve this?

Thank you for your time

EDIT: Nvm for my problem, I just had to download the new Scar version (mine was still on Divi 3.06 or something, noow i upgraded it to divi 3.12c i believe, and it's running just fine.

pl0xmypl0x
10-20-2007, 03:13 PM
ty this helped

tckaile
10-21-2007, 08:28 PM
Thanks JAD for the tutorial. I recently found out about SCAR and SRL and thought that it would be pretty cool to learn a scripting language. I've downloaded most of the free scripts for reference and I've bookmarked every tut I have come across. Hopefully one day I will be as masterful with scripting as you are. Thank you again.

k3thunder
10-23-2007, 01:02 AM
Install SRL forum? where is this forum pleas? i get that error all the time and ive been looking for the forum to read this and fix my little problem. can you pleas point me to the install SRL forum?

yokosho
10-25-2007, 12:50 AM
Here's my Power Fighter 2.5 Script but It still won't run. What did I do wrong?

Begin If+
290,then(InChat('JAD is awesome!'))
Writeln('JAD is awesome was in the chat!');
((251,'Us',0))and(NotLogedIn)then
Mouse(447,322,10,2,true);
Ch33pFighter +
+ v2.5 +
+ Powerfighter by Ch33pSh33p +
+ <3 Kaitnieks Creator of SCAR +
+*****************************************+
+ How to Use: +
+ 1.Setup at lines 54-66 +
+ 2.Highest angle of view +
+ 3.Needs OSi 4.011 +
+ 4.KillerBz's Boxbreaker +
+ 5.Silent Mouse off, Drag Cross into +
+ client +
+ 6.Dont run for more than 2 hours +
+ 7.Make sure the monster is a +
+ 3rd of your level +
+*****************************************+
+ Credits: +
+ Odie5533: For his OSi and his tut that +
+ really helped me start scripting +
+ <3 Odie +
+ KillerBz: His Boxbreaker since +
+ Odie's shutdown +
+*****************************************+


Log:
v0.1 - Beta Test
v1.0 - Finalization
v1.1 - Public Release
v1.11 - Added Mod Detection Changed a few things
Silver and Gold Thanks to Mindping's bitmaps
v1.2 - Various Small Changes Now incorporates 4 monster colors
for total randomness
v2.0 - Added Eat Food Feature Have food in Inv
v2.1 - Added Mime Detection
v2.11 - Little Glitch not worth mentioning
v2.111 - Did a little Procedure Compacting
Main Loop Only 3 LINES!
v2.5 - Eat food Should work now

Notes: Cannot rub lamps
Will Talk to most randoms
Will Speak to Genie but not open lamp
If you dont want to eat dont have food in Inv
Will be adding bone burier soon

}

program Ch33pFighter;
var FT,ax,ay,Style,foodinvcolor:Integer;
MC1,MC2,MC3,MC4,Monster,tol,Attack1,Attackpat,Talk W,TalkY:integer;
Att,Attacking:boolean;
US,PW:string;

{.include OSi.txt}
{.include BoxBreaker2.txt}
End
Procedure Install;
begin
US:=''; //Username
PW:=''; //Password
MC1:=9344153; //Monster Color (Lightest)
MC2:=8423050; //Monster Color (Different Color Lightst)
MC3:=12567495; //Monster Color (Different Color Lightest)
MC4:=11975872; //Any color on monster (Peferably Lightest)
tol:=0; //Leave Alone
Style:=1; //Set fight style 1-4 top to bottom
FT:=25; //Fight Time in ms.
FoodInvColor:=1932007; //1202340 for lobbys 11170978 for swordys 6847895 for sharks and 1854166 for salmons
end;

Procedure LoginCheck;
var tab:integer;
begin
if(IsTextAt2(290,251,'Us',0))and(NotLogedIn)then
Mouse(447,322,10,2,true);
if(IsTextAt2(306,241,'We',0))and(NotLogedIn)then
begin
Mouse(461,292,125,20,true);
if(IsTextAt2(268,214,'En',50))then
begin
Mouse(400,256,20,5,true);
SendKeysSilentsmooth(US,50);
Mouse(400,270,20,5,true);
SendKeysSilentsmooth(PW,50);
Mouse(300,322,20,5,true);
repeat
tab:=tab+1;
wait(100+random(50));
until(FindColor(x,y,8421504,0,0,515,338))
end;
end;
if(FindColor(x,y,8421504,400,0,515,338))then
begin
Mouse(x+5,y+1,15,5,true);
sendarrowsilentwait(0,900+random(200))
wait(200+random(100));
SetFightMode(Style);
end;
end;

procedure FindNPC; //Based Off Odie's
var tab,c:integer; Spoken:boolean;
begin
if(FindColor(x,y,65535,5,5,514,337))then wait(200)
if(FindColor(x,y,65535,5,5,514,337))and(LogedIn)th en
begin
repeat
if((x+tab) < 515)and((y+18) < 338)then
MoveMouseSmoothEx(x+tab,y+15+random(3),1,6,15,20,2 0);
wait(5);
if(IsTextAt2(9,9,'Talk',100))then
begin
GetMousePos(x,y);
Mouse(x,y,0,0,false);
Wait(200+random(100));
if(FindBitmap(TalkW,x,y))or(FindBitmap(TalkY,x,y)) then
begin
Mouse(x,y,40,5,true);
MapFlag;
wait(1000+random(1000));
while((FindColor(x,y,16711680,5,345,510,465))or
(FindColor(x,y,16777215,5,345,510,465)))and
(not(GetColor(20,434)=0))and(c<=10)do
begin
Mouse(x,y,50,2,true);
wait(2000+random(1000));
end;
Spoken:=true;
end;
end;
until(tab>=250)or(Spoken);
end;
end;

procedure FindrareRandoms;
var ax,ay:integer;
begin
if(FindColor(ax,ay,786423,10,350,150,433))then
begin
LogOut('Mod Found');
end;
If(findcolor(ax,ay,10658466,10,350,150,433))then
begin
logout('Mod Found')
end;
if(GetColor(30,418)=0)and(GetColor(72,429)=0)then
begin
LogOut('You died!');
end;
if(FindColor(ax,ay,11503238,10,350,479,433))then
begin
LogOut('Mime Found');
end;
end;

Procedure DetectRandom;
begin
LoginCheck;
FindNPC;
FindStrangeBox;
FindrareRandoms;
end;

Procedure Eat;
var c:integer;
begin
Writeln('You have low hp')
wait(500+random(500));
OpenBag;
if(FindColorSpiral(x,y,FoodInvColor,560,210,730,46 0))then
repeat
OpenBag;
if(FindColorSpiral(x,y,FoodInvColor,560,210,730,46 0))then
begin
Mouse(x,y,2,2,true);
wait(3000+random(250));
end;
c:=c+1;
until(GetHp>80)or(c>4)
OpenBag;
end;

Procedure Attack;
var c:integer;
begin
Monster:=random(4);
case Monster of
0:Monster:=MC1;
1:Monster:=MC2;
2:Monster:=MC3;
3:Monster:=MC4;
end;
x:=25+random(230);
y:=25+random(230);
if(FindColorSpiralTolerance(x,y,Monster,5,5,514,33 7,tol))then
begin
status('Ch33pFighting');
MoveMouseSmooth(x,y);
GetMousePos(ax,ay);
if(not FindColor(ax,ay,65280,ax-15,ay-30,ax+10,ay+15))and
(not(FindColor(ax,ay,65280,240,125,270,180)))then
begin
Mouse(ax,ay,1,1,false);
wait(150+random(50));
if(FindBitmapIn(Attack1,x,y,10,12,516,342))or
(FindBitmapIn(Attackpat,x,y,10,12,516,342))then
begin
Attacking:=true;
wait(50+random(25));
Mouse(x,y,5,3,true);
for c:=0 to 3 do
if(not (FindColorSpiral(ax,ay,65280,240,125,270,180)))the n
begin
MapFlag;
wait(300+random(125));
DetectRandom;
end;
end
end;
end;
end;

Procedure AttackAll;
begin
DetectRandom;
wait(300+random(200));
Att:=False;
Attack;
Wait(FT+random(2000));
Gethp;
if(Gethp<35)then
Eat;
end;

Procedure LoadBmps;
begin
Attack1 := BitmapFromString(10, 6,
'FFFFFF5D54475D54475D5447FFFFFFFFFFFF5D54475D54475 D5447' +
'5D5447FFFFFFFFFFFF5D54475D5447FFFFFFFFFFFF0000005 D5447' +
'5D54475D5447FFFFFFFFFFFF0000005D5447FFFFFFFFFFFF0 00000' +
'5D54475D54475D5447FFFFFFFFFFFF0000005D5447FFFFFFF FFFFF' +
'FFFFFFFFFFFF5D54475D5447FFFFFFFFFFFF0000005D5447F FFFFF' +
'FFFFFF0000000000000000005D5447FFFFFFFFFFFF0000005 D5447' +
'FFFFFFFFFFFF0000005D54475D54475D5447');
Attackpat := BitmapFromString(21, 7,
'5D5447FFFF00FFFF000000005D54475D54475D54475D54475 D5447' +
'5D54475D54475D54475D54475D54475D54475D54475D54475 D5447' +
'5D54475D54475D54475D5447FFFF00FFFF00FFFF00FFFF005 D5447' +
'5D54475D5447FFFF00FFFF00FFFF00FFFF005D54475D54475 D5447' +
'5D5447FFFF00FFFF00FFFF00FFFF005D54475D5447FFFF00F FFF00' +
'0000000000000000005D5447FFFF00FFFF00000000000000F FFF00' +
'FFFF005D54475D5447FFFF00FFFF000000000000000000000 00000' +
'5D5447FFFF00FFFF000000005D54475D54475D54475D5447F FFF00' +
'FFFF00FFFF00FFFF00FFFF000000005D5447FFFF00FFFF000 00000' +
'5D54475D54475D54475D5447FFFF00FFFF000000005D54475 D5447' +
'5D5447FFFF00FFFF00000000000000FFFF00FFFF000000005 D5447' +
'FFFF00FFFF000000005D54475D54475D54475D5447FFFF00F FFF00' +
'0000005D54475D54475D5447FFFF00FFFF000000005D5447F FFF00' +
'FFFF000000005D5447FFFF00FFFF000000005D54475D54475 D5447' +
'5D54475D5447FFFF00FFFF00FFFF005D54475D54475D5447F FFF00' +
'FFFF00FFFF00FFFF00FFFF000000005D54475D5447FFFF00F FFF00' +
'FFFF00FFFF005D5447');
TalkW := BitmapFromString(17, 10,
'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000000 00000' +
'000000000000000000000000000000000000FFFFFFFFFFFF0 00000' +
'000000FFFFFFFFFFFF0000000000000000000000000000000 00000' +
'000000000000000000000000000000FFFFFFFFFFFF0000000 00000' +
'FFFFFFFFFFFF0000000000000000000000000000000000000 00000' +
'000000000000000000000000FFFFFFFFFFFF000000000000F FFFFF' +
'FFFFFF0000000000000000000000000000000000000000000 00000' +
'000000000000000000FFFFFFFFFFFF000000000000FFFFFFF FFFFF' +
'000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF0 00000' +
'000000000000FFFFFFFFFFFF000000000000FFFFFFFFFFFF0 00000' +
'000000000000FFFFFFFFFFFF000000000000FFFFFFFFFFFF0 00000' +
'000000FFFFFFFFFFFF000000000000FFFFFFFFFFFF0000000 00000' +
'000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000 00000' +
'FFFFFFFFFFFF000000000000FFFFFFFFFFFF0000000000000 00000' +
'FFFFFFFFFFFF000000000000FFFFFFFFFFFF000000000000F FFFFF' +
'FFFFFF000000000000FFFFFFFFFFFF000000000000000000F FFFFF' +
'FFFFFF000000000000FFFFFFFFFFFF000000000000FFFFFFF FFFFF' +
'000000000000FFFFFFFFFFFF000000000000000000000000F FFFFF' +
'FFFFFFFFFFFFFFFFFFFFFFFF000000000000FFFFFFFFFFFF' );
TalkY := BitmapFromString(17, 10,
'FFFF00FFFF00FFFF00FFFF00FFFF00FFFF000000000000000 00000' +
'000000000000000000000000000000000000FFFF00FFFF000 00000' +
'000000FFFF00FFFF000000000000000000000000000000000 00000' +
'000000000000000000000000000000FFFF00FFFF000000000 00000' +
'FFFF00FFFF000000000000000000000000000000000000000 00000' +
'000000000000000000000000FFFF00FFFF00000000000000F FFF00' +
'FFFF000000000000000000000000000000000000000000000 00000' +
'000000000000000000FFFF00FFFF00000000000000FFFF00F FFF00' +
'000000000000000000000000FFFF00FFFF00FFFF00FFFF000 00000' +
'000000000000FFFF00FFFF00000000000000FFFF00FFFF000 00000' +
'000000000000FFFF00FFFF00000000000000FFFF00FFFF000 00000' +
'000000FFFF00FFFF00000000000000FFFF00FFFF000000000 00000' +
'000000000000FFFF00FFFF00FFFF00FFFF00FFFF000000000 00000' +
'FFFF00FFFF00000000000000FFFF00FFFF000000000000000 00000' +
'FFFF00FFFF00000000000000FFFF00FFFF00000000000000F FFF00' +
'FFFF00000000000000FFFF00FFFF00000000000000000000F FFF00' +
'FFFF00000000000000FFFF00FFFF00000000000000FFFF00F FFF00' +
'000000000000FFFF00FFFF00000000000000000000000000F FFF00' +
'FFFF00FFFF00FFFF00FFFF00000000000000FFFF00FFFF00' );
end;

Procedure LoopCompacter;
begin
Install;
SetupOSi;
BoxOpenerSetup;
LoadBmps;
LoginCheck;
Setfightmode(style);
Chatfixer;
repeat
Attackall;
until(false);
LogOut('Fighting Over');
Writeln('Plz Report Bugs to hellzwing@gmail.com');
end;

begin
LoopCompacter;
end.

Tri
11-02-2007, 01:32 PM
Very very very very helpful, I am a noob to scripting, and didn't really understand some of the errors I was getting, but this helped me A LOT...

Thanks

jussp
11-03-2007, 01:46 PM
Thanks for this !!!!

JAD
11-05-2007, 10:57 PM
Wow thanks a lot everyone!

Glad many of you were helped by this.

tr1ck321
11-08-2007, 07:00 AM
Thanks, solved 2 problems for me.

jake 007 9
11-09-2007, 12:58 PM
finaly i canrun al the scripts that i want with out te annoying erros thx

campross.04
11-09-2007, 03:00 PM
hey you tut is really help full i no how to fix my errors now thnx

montazar
11-09-2007, 05:56 PM
thanks alot this will help me out if i do make any scripts lol!

br@@k
11-10-2007, 11:15 AM
thank you

br@@k
11-11-2007, 01:37 PM
THANKS M8 I FIXED IT NOW!!!! YAY!! YAYAYAYAYAAY!!! :D :D :D :D :D :D :rolleyes:

DarkEmber
11-12-2007, 05:14 PM
So very helpful, I had no idea what Out of Range meant, made me say a big fat "ooooooh"

I've read all your other TUTs and I think theyre all very good, thanks:D

j-g
11-12-2007, 10:09 PM
what to do if u get this error?
(it happens why u want to open in a vm)
Quote:

[Runtime Error] : Exception: Access violation at address 00671FE5 in module 'SCAR.EXE'. Read of address 82E5A028 in line 184 in script C:\PROGRAM FILES\SCAR 3.12\includes\SRL/SRL/Core/Text.scar
If u get that error a tab will open called text

sorry im not experienced enough to know what u should change in youre script

Doreauxgard
11-15-2007, 09:50 PM
sweet job ive saved this thread in my favorites to refer to if i get one. much appreciated:)

IPwnz
11-16-2007, 03:36 AM
This is really helpful, I have it bookmarked for future reference from now on.

Matsetst
11-17-2007, 12:29 AM
Thanks, some times I have some of this errors :P its annoying.

Daniel
11-22-2007, 09:29 AM
How do i solve this error:function FBMP(Bitmap,MM,MMS:Integer):Boolean;
var
x, y: Integer;
begin
if(FindBitmap(Bitmap, x, y)) then
begin
if(MM := True) then
begin
if(MMS = True) then
begin
MoveMouseSmooth(x,y);
end else
MoveMouse(x,y);
end else
end;
end;

I know it is a useless function but i am bored atm. So!

flipsk8r1106
12-01-2007, 06:22 PM
thnk you.
you just made life a lil easier : ]

StrikerX
12-01-2007, 10:45 PM
NIce but could you do something thike that stupid core problem its my biggest problem

chewgun
12-09-2007, 09:38 PM
oh man,this is awesome.

I found answers to most errors I got.
This tutorial actually helped me kinda get used to putting colons and semi-colons(and a in the right places)

(h) Thanx for this tut,very very useful!

ub3rn00b
12-10-2007, 03:25 AM
wow this is the second tut i have look at from you. tks for all the help.

Scathis
12-26-2007, 12:54 AM
im getting the error

Line 49: [Error] (14730:40): Type mismatch in script E:\******\****.scar


line48- repeat
line49- if FindObj(x, y, 'hop', TreeColor, 30) then
line50- begin

i can't see an explination on the tut

Thanks everyone

JAD
12-26-2007, 01:11 AM
im getting the error

Line 49: [Error] (14730:40): Type mismatch in script E:\******\****.scar


line48- repeat
line49- if FindObj(x, y, 'hop', TreeColor, 30) then
line50- begin

i can't see an explination on the tut

Thanks everyone

Maybe TreeColor's a string or something.

I'd need to see the whole script to be able to help you. Sorry.

Or at least lines 1-50 :)

DarkAges33
12-26-2007, 01:26 AM
oh man thnx a lot for this, helped me out :)

footballjds
12-26-2007, 07:15 PM
dude you don't even wana know how much i use this! ive looked over this like 40+ times to see wtf my errors are... thanks so much! rep+ 5 star!

Add socket errors if ya could =p

FEAR
01-04-2008, 04:22 PM
Thanks, :)

The errors in scar does get annoying sometimes.

I am making my fIrst script, a mining-banking script and already got so many errors you mentioned.

Thanks for clearing the errors up. :D

~~ FEAR ~~

JAD
01-04-2008, 04:47 PM
Thanks for posting everybody! Glad to help :)

ins3
01-04-2008, 09:41 PM
Doing the automatic download of the latest SRL often fixed error #2 for me, perhaps you could add that to your list?

Gold
01-10-2008, 12:30 AM
THANK YOU VERY MUCH i had so many cool scripts with stupid crap like out of range i can fix now you are awesome

Relath
01-10-2008, 03:00 AM
lol this has helped me so much in scripting because i just keep making endless mistakes and errors. Thanks a bunch!

footballjds
01-14-2008, 04:56 AM
i like it a lot, but add variable expected... it happens when someone uses a number instead of a variable like: FindDTM(1, 1 <-- instead of FindDTM(x, y
:)

migaeler1
01-15-2008, 01:31 PM
Type mismatch in script. what this means??

malotthouse
01-15-2008, 03:07 PM
very handy, helps alot :)

thanks jad

The Voices
01-19-2008, 08:37 AM
another very helpful tut :)
thanks a ton for this

Kakumei
01-23-2008, 11:14 PM
So I got through the tutorial pretty easily, but the way you typed everything out (grammatically) really confused my nooblet brain. Thanks for your help anyways... Sorry I'm such a picky little bugger!

Periods are your best friends in punctuation but not during that time of the month. =]

JAD
01-24-2008, 12:12 AM
So I got through the tutorial pretty easily, but the way you typed everything out (grammatically) really confused my nooblet brain. Thanks for your help anyways... Sorry I'm such a picky little bugger!

Periods are your best friends in punctuation but not during that time of the month. =]

I wrote this when I was much younger. Sorry :)

da_k1ng
01-27-2008, 03:42 AM
this is great now i know how to fix the problems that keep occuring for me :)

dillbagz
01-27-2008, 05:38 AM
you fixed my problems.

Bettta
01-27-2008, 06:37 AM
hey do you know what this means? [Runtime Error] : Exception: '<' is not a valid integer value in line 2816 in script C:\Documents and Settings\Administrator\Desktop\Tutorial Runner[1].Pub.0.59.scar

i tryed fixing but no luck...

o btw this came from Nielsie95's Tut island runner.

footballjds
01-27-2008, 07:07 AM
i dunno, is there an ">" after the "<" if not put it there :p, but the error message is correct "<" is not integer :D!

littlelegs
01-30-2008, 06:49 AM
Include file C:\Program Files\SCAR 3.12\includes\OSi.txt does not exist.
Include file C:\Program Files\SCAR 3.12\includes\BoxBreaker.txt does not exist.

Can someone help....

I dont get it hwen you said the errors... isnt this different where can i get box breaker

Thanks

JAD
01-30-2008, 10:32 PM
Include file C:\Program Files\SCAR 3.12\includes\OSi.txt does not exist.
Include file C:\Program Files\SCAR 3.12\includes\BoxBreaker.txt does not exist.

Can someone help....

I dont get it hwen you said the errors... isnt this different where can i get box breaker

Thanks

You're using an old crappy script. Get a new one that uses srl :)

footballjds
02-01-2008, 01:17 PM
Include file C:\Program Files\SCAR 3.12\includes\OSi.txt does not exist.
Include file C:\Program Files\SCAR 3.12\includes\BoxBreaker.txt does not exist.

Can someone help....

I dont get it hwen you said the errors... isnt this different where can i get box breaker

Thanks

i remember them good old days :D

Dervish
02-02-2008, 11:19 AM
This was very useful, specially the "SetupSRL" part !!!! thanks u pwn now i can finish my miner ;)

moonlight
02-03-2008, 03:58 PM
thx for that tut dude it helped me ;)

footballjds
02-04-2008, 04:42 PM
this tut owns, once again i have to tell you how much i use and appreciate it :D

nikos
02-10-2008, 03:30 AM
very useful thanks. Good to keep as reference!

pwnzr
02-10-2008, 03:45 AM
thanks this gave me a really good understanding of scar and how to script

bandwevil
02-10-2008, 09:14 PM
This was really useful, it helped me fix several errors I had in my scripts.

Griff
02-19-2008, 01:10 AM
thanks a lot for the tut i am fixing my errors with my very basic scripts now!

mcnollend
02-21-2008, 12:22 AM
thanks for the info, it helped me with getting scar to work.

jaimefire2
02-21-2008, 08:58 PM
Thanks A+++ :D

Carrot5
02-23-2008, 02:59 AM
This is my error:Failed when compiling
Line 29: [Error] (29:1): Unknown identifier 'Powerminer' in script C:\Program Files\SCAR 3.13\Scripts\Powerminer.scar

Torrent of Flame
02-23-2008, 06:46 PM
Mine says Identifier Expected on "Const" like help?

And it says I need a Colon in my variable listings

03data
02-24-2008, 01:27 PM
thx, as soon as i have my script finished ill post it :)

gillian
02-25-2008, 01:59 AM
JAD .. yet another great tutorial .. I am starting to just search for stuff with your name attached to it :p thank you!

Nose Smasher
02-25-2008, 02:54 AM
I read a few of the pages... and I saw a few people ask about Runtime Errors and Type Mismatch's... but what exactly is a [Runtime Error] : Type Mismatch?

john smith
03-31-2008, 12:50 AM
great tut, very detailed, thanks

jackhand723
04-03-2008, 08:37 AM
ive had this many times := scanexactminimap or something like that
i cant find this in this tut
its so annoying and ive tried everything i know 2 fix it
some one said it was something about plug ins but i dont know what they are
thanks

-Handy

Noob xp1
04-05-2008, 09:11 PM
very well done

Gazrat
04-07-2008, 03:21 AM
i saw that help like #2 or something but these are slightly different.
What do i do here?
"include file c:\program files\scar 3.15\includes\srl\srl\misc\smart.scar does not exist"
"include file c:\program files\scar 3.15\includes\srl\srl\misc\bitmaps.scar does not exist"

tbssagvw2
04-13-2008, 04:06 AM
Hey, I dont know if anybody's mentioned this yet, but if you can tell me how to fix it that'd be cool =)...What do you do when it says "Type mismatch in script"? Thanks

tbssagvw2
04-13-2008, 04:18 AM
Sorry, double post =O

Pu3rto0wn
04-16-2008, 12:38 PM
always get this error Line 48: [Error] (13122:8): Unknown identifier 'FindMime' in script

please help

StrikerX
04-16-2008, 12:40 PM
always get this error Line 48: [Error] (13122:8): Unknown identifier 'FindMime' in script

please help

you dont need that just use

FindNormalRandoms

Pu3rto0wn
04-16-2008, 08:44 PM
ok but what about the scripts i want tuse but have that in it

Pure1993
04-17-2008, 07:19 PM
I came across a different comma exptected in script error (again :rolleyes: ), and I don't know if it has been posted before, but if it hasn't, here is the problem and how to solve it:
Problem:

Writeln('Hi, I am 'IntToStr(age)' years old');

Solution:

Writeln('Hi, I am '+IntToStr(age)+' years old');

Explanation: The pluses are missing... :duh:
It is because of the simplicity of the error that it appears almost every time I write a script :D

Edit: To The Person who posted above me:
Question:
ok but what about the scripts i want tuse but have that in it
Answer: Select the entire "FindFastRandoms" and delete it. after that you schould get an error like: "unknown identifier" a couple of times, jumping to the lines in which the procedure is still called for. just delete all of those, too. btw: scripts using FindFastRandoms are probably way outdated, so the probability that they should work for someone with little Scar knowledge is at about 0%. Get an up-to-date script, or maybe kindly ask the person if he/she could update it. Easy solution to an easy problem. :)
(I'm really in the mood today to help, I'd better shut my pc off now, or I might get annoying ;))

sunny
04-22-2008, 11:58 AM
im getting this come up
[Runtime Error] : Out Of Range in line 1211 in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Core/AntiRandoms/AntiRandoms.scar

is this like your
Error 10: Out of range error.



Solution:
This is most commonly caused by not setting your players right in the player arrays. When you set the number of players, you are setting the number of slots that there are players for, ACTIVE OR NOT! so if you have 2 users active, but there are 6 slots, then you still have the how many players as 6.

because if it is im confuse because im sure i have my players setup right and i dont have 1211 lines to my script and it popped up with anti randoms

rep++ for help

thebob142
04-24-2008, 02:38 AM
how you fix this?

Line 61: [Error] (12724:20): colon (':') expected in script D:\Documents and Settings\kids\Desktop\powerminner.scar

edit: nvm got help on irc

spartan6934
04-24-2008, 02:47 AM
thats very helpful

Rouge_Ling
05-08-2008, 01:25 AM
Please help, i made this procedure and keep getting this error on script below.

Line 26: [Error] (12680:112): Type mismatch in script C:\Users\----\Desktop\A Work In Progress.scar


procedure locatebanksign;
var
x, y :integer;
acc :string;
angle :string;
begin
Writeln('Finding Bank Symbol');
FindDeformedBitmapToleranceRotationIn(BankSymbol, x, y, 536, 12, 711, 158, 30, 2, acc, PI/10, 0, 2 * PI, angle)true; // line 26
Result : acc;
end;


And this error for script below.

Line 75: [Error] (12729:69): Type mismatch in script C:\Users\-----\Desktop\A Work In Progress.scar


procedure open bank;
Var
Points :integer;
x, y :integer;
a, b :integer;
begin;
MakeCompass('n');
FindColorsSpiralTolerance(x, y, Points, 4679037, 5, 5, 514, 336, 70)true; //Line 75
FindBitmapToleranceIn(BankBooth, a, b, 536, 12, 711, 158, 25);
ClickMouseSpline(X, Y, 4, 4, True);
Wait(1000+Random(500));
ClickMouseSpline(a, b, 4, 4, true);
end;

Griff
05-09-2008, 10:17 PM
so I keep getting this invalid number of parameters in script. Does this mean that mean I have to check my entire script for where it could be?

opensourcev2
05-10-2008, 03:39 AM
Thank You, great thread by the way
I wish I knew about this before I started messing with random stuff lol

Akamaru
05-10-2008, 06:23 AM
Thank you i <3 you! Helped me!

spicynachos2
05-10-2008, 08:22 PM
thanks this will help...

loltikiplz
05-11-2008, 06:55 AM
ty... helped out alot much love:google:

Zlakata
05-15-2008, 01:51 PM
Sometimes i get this error "Line XX: [Error] (13122:8): Unknown identifier 'RunBack' in script/// or instead of RunBack is DropTo :\

any ideas?

Anyways Great Tutorial, clarified a few things for me :))

Rich
05-16-2008, 05:23 PM
Hey,I get this error:


Line 79: [Error] (12741:20): colon (':') expected in script D:\Program Files\SCAR 3.15\Scripts\mysecond script.scar

From this part of my script that I am trying to make:


1: Mouse(x, y, 4, 4, False);
ChooseOption('ine');
2: Mouse(x, y, 4, 4, True);

Please reply ASAP.
Thanks,
Richard.

DGKbattle
05-18-2008, 01:11 PM
i'm a beginner at scripting and kept getting loads of these errors

DGKbattle
05-18-2008, 01:12 PM
Having read this though I am finding it much easier to script and fix other peoples scripts.

DGKbattle
05-18-2008, 01:13 PM
Thanks!!!!!!!

DGKbattle
05-18-2008, 01:15 PM
Thanks JAD please make more!

EdsuBR
05-26-2008, 07:20 PM
Very useful Tutorial, i learned how to fix like 3 or 4 errors that i used to have :P, here.
I hope other noobs have the 'inteligence' to read this post before triple posting the same thread with the same error.

13om13e12
06-05-2008, 02:48 PM
Wow Ty Jad this was extremely helpful.

Boingpie
06-12-2008, 04:09 PM
i got this error, it isnt mentioned on your guide
'Line 2570: [Error] (15224:44): Type mismatch in script C:\Documents and Settings\ur mum\anal rape\1337 pwn4g3\Runescape\Scar\GuildMiner 30 Release.scar

Lycan Fenrir
06-30-2008, 03:41 PM
Error 2: Include file C:\Program Files\SCAR 2.03\includes\SRL/SRL.scar does not exist. (or something like that)



Solution: this is the biggest error of all time. all you need to do for this is read the tutorial for installing SRL in the Install SRL forum. Moving on..

I got this, it could also mean the script you are using is out of date I think. Thats the problem I got.

Griff
07-25-2008, 08:10 PM
What do I do for type mismatch in the script?

Ghostman
07-26-2008, 11:54 PM
Nice tut

I forget about the comma alot to:duh:

Griff
07-30-2008, 08:35 PM
ghostman, how do you become a lesser demon?

livewrong811
08-03-2008, 01:14 PM
Very informative, the errors make more sense now, lol.

jackhand723
09-27-2008, 12:57 AM
ok im totaly stumped on how to fix this
[Runtime Error] : Exception: Canvas does not allow drawing in line 60 in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Core/Login.scar

any ideas?

godspower55
11-01-2008, 03:22 PM
wow tyvm i needed this.

oakley123
11-01-2008, 09:47 PM
If this thread is still alive...I had been getting problems saying "Then" expected in line:x. ( Already have error up there ) In my case i already had an "Then" after the IF. It turned out to be a problem with having to many parenthesis.Add that to the error in the first post please.:garfield:

madmike
01-18-2009, 02:11 AM
i get an error and it.....

Line 46: [Error] (256:11): Unknown identifier 'CreateTPAFromBMP' in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Core/Math.scar

line 46 says this.....

Result := CreateTPAFromBMP( GetBitmapDC(TempBMP));

zencius1
02-09-2009, 05:26 PM
I can say one thing:Your MASTER:D

spicynachos2
06-24-2009, 05:13 AM
I like this, thanks. I have fixed like 5 errors without needing to post thanks to this.

basse
06-26-2009, 09:07 PM
i get the same error as madmike..

Failed when compiling
Line 46: [Error] (311:11): Unknown identifier 'CreateTPAFromBMP' in script C:\Program Files\SCAR 3.20\includes\SRL/SRL/Core/Math.scar


what to do??

JAD
06-27-2009, 12:30 AM
i get the same error as madmike..

Failed when compiling
Line 46: [Error] (311:11): Unknown identifier 'CreateTPAFromBMP' in script C:\Program Files\SCAR 3.20\includes\SRL/SRL/Core/Math.scar


what to do??

I am not 100% sure on that, but I don't think that you have the latest revision of SRL. Try updating SRL and tell me if that fixes it.

Dynamite
06-27-2009, 12:35 AM
Rep++
The Best guide I have used probably. I have favorited this page ;)
I have used this sooooo many times.

Thank you

T~M

Han
08-06-2009, 09:06 PM
This tut helps me out.. These problems happen a lot and now I am going to finish them all, thanks ;)

Raykorin
08-31-2009, 11:45 PM
you have said that the out of range errors are cause by improperly setting your players, but I have quadruple checked to make sure they are set properly and I still get this error:
"[Runtime Error] : Out Of Range in line 39 in script C:\Program Files\SCAR 3.21\includes\SRL\SRL\Core\AntiBan.scar"

Does anyone know how to fix this?

Camaro'
11-28-2009, 01:03 AM
Gravedig because this tutorial is needed, i was making a tutorial on this when i forgot to search if one was made.

putonajonny
12-12-2011, 07:59 PM
ok JAD This Is Bothering Me

Line 61: [Error] (18102:1): comma (',') expected in script

60-wait(10+random(3))//needed another closing bracket there
61-FindTalk;
62-if(FindFight) then

the numbers are just the lines 60, 61, 62

fancy fixing my error:

On compiling I am getting the following warnings:


[Warning] (392:17): "True and" is not needed at line 391
[Warning] (1:1): Calculation always evaluates to True at line 0
[Warning] (1:1): "and True" is not needed at line 0

Lime 391:
If((LootBones and PtoLB) or (JustLootBones)) then

obviously I can't paste line 0 but if you want to see the whole script go here (http://villavu.com/forum/showthread.php?t=69124)

Jhangir
12-24-2011, 09:16 PM
Finally I fixed my small annoying error.

imaloser
01-08-2012, 12:30 AM
BUMP - This shit is good, Someone Should make an updated version with more Error Code Troubleshooting! TY!

Emotional
02-14-2012, 10:22 PM
WalkToTheDepositBox; <- Compiling Failed

alucard123
09-16-2012, 03:39 PM
I wish i seen this befor having to find the solutions myself xD

nemaster
02-26-2013, 04:07 AM
You guys are making enjoy learning more about scripts when I came here for 07 scape. I never knew about color bots before searching up 07 scape bots on google and powerbot forum but the more I learn the more I feel educated on scripts and how they work. Thanks for this. Might make my own script.

Gucci
02-26-2013, 05:13 AM
You guys are making enjoy learning more about scripts when I came here for 07 scape. I never knew about color bots before searching up 07 scape bots on google and powerbot forum but the more I learn the more I feel educated on scripts and how they work. Thanks for this. Might make my own script.

Glad to hear you want to learn scripting :)

nemaster
02-27-2013, 03:00 AM
Glad to hear you want to learn scripting :)

Its actually not so overwhelming once you get the hang of it. Im making scripts for flash games in order to get my barrings. Scripts can be used for so much more than runescape.

xoy
02-27-2013, 11:56 PM
i get the semicolon error but i dont know where to add it too, have been looking at variables and function/procdures but no luck

this is the error

procedure SaveFormInfo(Sender: TObject);
begin
DsgnForm.ModalResult := mrOk; <---- that line