SRL Archive - OSR Help

Looking for a helping hand


andymabon

2013-03-09 09:46:30

Hey guys,

I'v been on these forums for a good few months, just looking around and picking up a little with regards to scripting. So far seems good! Was looking at making a couple of scripts for 07 RS, But was wanting to play around a little with the current scrpts and see what i could kinda come up with myself.

As i am still a complete beginner im having a great big brain fart with some of the Anti-Leeches that people are putting on their scripts. I intend to use them properly, i also intend to use them to develop my knowledge. But if i do not know what is wrong im struggling to get it. Specifically this one has stumped me so far: http://villavu.com/forum/showthread.php?t=98246 with the 3rd anti-leech ([Error] C:\Simba\Scripts\[Upgraded] AIO Fighter.simba(28:12): colon (':') expected at line 27
Compiling failed.) To which i have been told the error is on line 23. Which is just calling a Variable.

var
x, y: Integer;
Combat1, num1, num2, attnum, bonesInv, buriedBones, Bonecount, MAttacked:
////// CHOOSE TO BURY BONES //////
Function BuryBones:
begin;
result := true; //true to bury, false to not.
end;

Not sure what is wrong within that section there? and there seems to be another 8 after this! used a few scripts great! got past the anti leech's on them. Please someone help me figure out how to learn this stuff!!

Thanks

VillaVuFTW

2013-03-09 09:49:15

var
x, y: Integer;/// Notice how this signifies what is going on and What X, And Y are? (integer) and ending with a ;
Combat1, num1, num2, attnum, bonesInv, buriedBones, Bonecount, MAttacked: /// This one has the colon but doesn't tell what these are.. ending with a ;

andymabon

2013-03-09 10:04:20

From: VillaVuFTW
var
x, y: Integer;/// Notice how this signifies what is going on and What X, And Y are? (integer) and ending with a ;
Combat1, num1, num2, attnum, bonesInv, buriedBones, Bonecount, MAttacked: /// This one has the colon but doesn't tell what these are.. ending with a ;


Thanks so much for a really quick reply. I still am struggling to get my head round it though. I see that the line was not terminated, and nothing was defined to let the script know what it is looking for. But i cannot fathom out what it is!

I blame a lack of sleep and a new language to play with :P

So understanding that the functions that it is calling up within the variable, seem to be all integer based, it would just be integer and then terminate again? Because it seems the next of the anti-leach's may be straight after, no matter what i put, im a little uncertain as to if i am getting it correct. Its obviously not going to be Boolean. Do not think its going to be Extended. Leaving String or Integer behind, but im unsure as to what the functions are calling upon? seems as though its Integer data.

VillaVuFTW

2013-03-09 10:55:05

From: andymabon
Thanks so much for a really quick reply. I still am struggling to get my head round it though. I see that the line was not terminated, and nothing was defined to let the script know what it is looking for. But i cannot fathom out what it is!

I blame a lack of sleep and a new language to play with :P

So understanding that the functions that it is calling up within the variable, seem to be all integer based, it would just be integer and then terminate again? Because it seems the next of the anti-leach's may be straight after, no matter what i put, im a little uncertain as to if i am getting it correct. Its obviously not going to be Boolean. Do not think its going to be Extended. Leaving String or Integer behind, but im unsure as to what the functions are calling upon? seems as though its Integer data.


You have to set those as variables.. But if you noticed after MAttacked: <— Doesn't tell what that set of items are… Possible it could be an Integer.. But who knows ;)

andymabon

2013-03-09 11:28:31

From: VillaVuFTW
You have to set those as variables.. But if you noticed after MAttacked: <— Doesn't tell what that set of items are… Possible it could be an Integer.. But who knows ;)


seems to me that would be a boolean statement, as im gathering its a yes no as to if monster attacked, then it could be number of mobs attacked? then making it integer… only have a very basic grasp of coding in Simba so far lol… this confuses me XD

Sjoe

2013-03-09 11:36:25

From: andymabon
seems to me that would be a boolean statement, as im gathering its a yes no as to if monster attacked, then it could be number of mobs attacked? then making it integer… only have a very basic grasp of coding in Simba so far lol… this confuses me XD


Try reading Coh3n's beginner guide for a better understanding.

andymabon

2013-03-09 11:45:57

Thanks for the help guys. I have been looking at the tutorials and am trying to grasp this, but its just not sinking in properly.

I think i have fixed it? but dont wanna post here so have pm'd the guy who responded first. Gone through another few Anti-leach settings, only to come across another. Think this guy really didnt want noob coders using his script :(



Attempting to figure out what is wrong with this Procedure:
procedure SetMeUp;
begin
writeln('-- Configuring player --');
writeln('-> Checking AutoRetaliate.');
P07_AutoRetaliate(true);
writeln('-> Checking CombatStance');
if(FightStyle = 0) then
begin
writeln('ERROR: Please fill in the FightStyle settings!');
TerminateScript;
end;
P07_CombatStance(FightStyle);
writeln('-> CombatStance = '+Inttostr(FightStyle)+'');
writeln('-> Making Compass South');
P07_MakeCompassSouth;
writeln('-> Making Camera Angle High');
P07_MakeCameraAngleHigh;
P07_SetRun(true);
writeln('-- Configuration completed --');
writeln('');
ProgressReport;
buriedBones := 0;
bonesInv := DTMFromString('mQwAAAHicY2ZgYJjNxMCwAIgnA/FTIP8FED8G4uWzZwFJRoYNS5YwsAJZMMyIhIEAAG7VCG8=');
end;

Error is apparently on the line reading "progressreport;" which seems ok to me? checking into the coding of the procedure itself for the proggie, but stumped again :( Alot of easy anti-leaches, not alot but some real hard ones for nubs…




I have taken that part out of the script, as im not too sure im too bothered about a proggie for now, will look into that as soon as i figure out how to get this working, feel dumb as hell right now cause im running into issue after issue :(

now onto next one that has a missing comma somewhere i cant work out :(