View Full Version : Help with first script.
Solidone40
02-13-2012, 11:04 PM
Hey guys, earlier I was getting "Exception in script: Access violation" but I fixed it with a couple of ":"'s. Now, I have been getting a "syntax error" on this line of script
case Destination OF:
Any advice on how to fix this?
x[Warrior]x3500
02-13-2012, 11:20 PM
take out the :
case example of
1:
2:
end;
Solidone40
02-13-2012, 11:22 PM
x3500;928220']take out the :
Warrior, when I do that it says "Exception in script: Access violation."
Kyle Undefined
02-13-2012, 11:23 PM
What is Destination?
Solidone40
02-13-2012, 11:28 PM
Destination is a constant, for the choice of location on my script. It's a basic teleporter, and you can chose varrock or cammy.
Kyle Undefined
02-13-2012, 11:29 PM
Could you post the script? Or more than just one line?
x[Warrior]x3500
02-13-2012, 11:32 PM
program new;
var
exampleInt : integer;
exampleStr : String;
begin
exampleInt := random(2)+1;
case exampleInt of
1: begin writeln('1'); ExampleStr:='one'; end;
2: begin writeln('2'); ExampleStr:='two'; end;
end;
case exampleStr of
'one': writeln('one');
'two': writeln('two');
end;
end.
this is an example of a case statement with an Integer, and a String. if your case statement looks like one of these, then its correct. somewhere else in your script has the issue.
Solidone40
02-13-2012, 11:43 PM
const
Destination = '' ; //Put destination here - Cmlt, or Vrck
Teleports = 0 ; //Put the desired number of teleports here
SRLStats_User = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
SERVER = 0; // Enter "0" to pick a random server.
MEMBERS = True; //False if F2P
BreakEvery = 250; // How long to bot before break
BreakFor = 10; // Break Length
NumbOfPlayers = 1;
StartPlayer = 0;
var
count: integer;
Then, after this,
Procedure Teleport;
var
x, y, Time :integer;
begin
if FindNormalRandoms or not (LoggedIn) then
TerminateScript;
case Destination OF
'vrck':
If I add a ":" to the OF, it says I have a syntax error. If not, it says "Exception in script: Access violation"
EDIT: Lemme know if you need the full script. I appreciate the help guys
x[Warrior]x3500
02-14-2012, 01:55 AM
program new;
{$I SRL/SRL.simba}
const
Destination = '' ; //Put destination here - Cmlt, or Vrck
Teleports = 0 ; //Put the desired number of teleports here
SRLStats_User = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
SERVER = 0; // Enter "0" to pick a random server.
MEMBERS = True; //False if F2P
BreakEvery = 250; // How long to bot before break
BreakFor = 10; // Break Length
NumbOfPlayers = 1;
StartPlayer = 0;
var
count: integer;
Procedure Teleport;
var
x, y, Time :integer;
begin
if FindNormalRandoms or not (LoggedIn) then
TerminateScript;
case Destination OF
'vrck':
end;
end;
begin
setupsrl;
teleport;
end.
it sucessfully compiles for me
EDIT: since this compiles for me, it cant really be in that part of the script :/ i think we need to actually see the script
Solidone40
02-14-2012, 02:02 AM
Here she is. The script shou,d work as it, minus the error lol. Thanks for the help guys.
program SolidTeleport; //by Solidone40
{$DEFINE SMART} //Post your proggys/bugs!
{$DEFINE SRL5}
{$i SRL/srl.simba}
const
Destination = '' ; //Put destination here - Cmlt, or Vrck
Teleports = 0 ; //Put the desired number of teleports here
SRLStats_User = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
SERVER = 0; // Enter "0" to pick a random server.
MEMBERS = True; //False if F2P
BreakEvery = 250; // How long to bot before break
BreakFor = 10; // Break Length
NumbOfPlayers = 1;
StartPlayer = 0;
var
count: integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1; //If you really want more, copy+paste
NumberOfPlayers(HowManyPlayers); //the form.
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
BoxRewards := ['XP','xp','lamp'];
Pin := '';
Active := True;
end;
end;
Procedure Setup;
begin
Smart_Members := False;
Smart_Server := 0;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
LoginPlayer;
Count:=0;
Wait(1000+Random(250));
FindNormalRandoms;
end;
Procedure Teleport;
var
x, y, Time :integer;
begin
if FindNormalRandoms or not (LoggedIn) then
TerminateScript;
case Destination OF
'vrck':
GameTab(tab_magic);
wait (30 + random(400)):
MoveMouse (671, 279);
begin
repeat
MarkTime(Time);
ClickMouse(x + random (5), y + random (5), 1, True);
wait (5800 + random (1400));
if FindBlackChatMessage('aw runes') then TerminateScript;
or if FindBlackChatMessage('ire runes') then TerminateScript;
or if FindBlackChatMessage('ir runes') then TerminateScript;
until (False);
end;
'cmlt':
GameTab(tab_magic);
wait (30 + random(400)):
MoveMouse (648, 635);
begin
repeat
MarkTime(Time);
ClickMouse(x + random (5), y + random (5), 1, True);
wait (5800 + random (1400));
if FindBlackChatMessage('aw runes') then TerminateScript;
or if FindBlackChatMessage('ir runes') then TerminateScript;
until (False);
end;
end;
end;
Procedure Antiban;
Begin
if(not(LoggedIn))then
exit;
FindNormalRandoms;
Case Random(80) Of:
1: HoverSkill('magic', False);
2: HoverSkill('random', False);
3: Boredhuman;
4: Wait(2500 + random(4500));
5: PickUpMouse;
6: RandomMovement;
7: RandomRClick;
end;
end;
Procedure MiniBreaker;
Begin
Case Random (120) Of:
1: Wait(430000 + random(7406))
2: Wait(55500 + random(8550))
3: Wait(220040 + random(6759))
4: Wait(34400 + random(2549))
end;
end;
procedure Proggy;
begin
WriteLn(// Progress Report \\');
WriteLn('Time Running: '+TimeRunning);
WriteLn('Teleports: ' +IntToStr(count));
WriteLn('//SolidTele by Solidone40\\');
end;
begin
Smart_Signed := TRUE;
Smart_Members := MEMBERS;
Smart_SuperDetail := FALSE;
activateClient;
SetupSRL;
DeclarePlayers;
if not (LoggedIn) then
LoginPlayer;
wait(5000+random(600));
repeat
Teleport;
Antiban;
Minibreaker;
until (count=loadcount) or (not LoggedIn)
Writeln('Script Finished');
Proggy;
end.
x[Warrior]x3500
02-14-2012, 02:36 AM
wow ok, lots of issues:
1. line 126. u forgot a '
2. line 103. get rid of the :
3. line 117. get rid of the :
4. line 118-121. end statements with ;
5. line 147. u havn't created the variable loadcount. u need to create it globally
6. move line 70 to line 66
7. move line 86 to line 82
8. line 68 needs a ; not a :
9. line 73 has too many parameters. get rid of true
10. line 75. get rid of "then TerminateScript;"
11. line 76. get rid of "if" and "then TerminateScript;"
12. line 77.get rid of "if"
13. line 84 needs a ; not a :
14. line 89 has too many parameters. get rid of true
15. line 91. get rid of "then TerminateScript;"
16. line 92.get rid of "if"
do u even debug your code? lol
Solidone40
02-14-2012, 02:49 AM
Thanks my man. And it's my first script, go easy on me haha. I was headstrong, and didn't pay much attention to detail. And what is this debugging of code that you speak of haha it sounds as though it could make my life much easier
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.