SRL Archive - Help and Support

Anti-Random Runtime Error Please Check.


P1nky

2008-08-18 13:44:51

Hey Dudes/Chicks


i have been ignoring this error, its from my powerchopper everyone has been complaining about it lol. but when i get mordaut it showed up and i think other randoms too :S.

check it out:

[Runtime Error] : Exception: Access violation at address 006D87F6 in module 'scar.exe'. Read of address 02133FFE in line 1075 in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Core/AntiRandoms/AntiRandoms.scar

Line in AntiRandom.scar:
 RawMenuText := GetTextAtEx(cx, cy, 0, upchars, True, True, 0, 0, -1, 25,
False, tr_NormalChars);


my FindRandom Proc:


//////////////////////
// RUNNING //
// FROM FIGHTS //
///////////////////

Procedure RunningFromFights; //IF FINDS A FIGHT IT WILL TRY TO RUN
Begin //DONT LIKE IT MUCH BUT IT WORK 50% TIME
If Not (LoggedIn) Or Not (Players[CurrentPlayer].Active) Then
NextPlayer(false);
FindNormalRandoms;
If (FindFight) Then //find someone fighting (hitting you)
Begin
Status('Running...'); //tells your status in scar
Runto('S', true); //runs SOUTH
End;
End;



////////////////////
// LOOK ALL KIND //
//OF RANDOMS //
/////////////////

Procedure FindRandoms; //FINDS RANDOMS
Begin
If Not (LoggedIn) Or Not (Players[CurrentPlayer].Active) Then
NextPlayer(false);
FindNormalRandoms;
wait(400)
Findtalk;
RunningFromFights;
FindLamp('Woodcutting');
End;

i dont think its my procs or is it, idk if FindTalk Is still being used but yeah please help thnx
btw ill be happy to rep

Timer

2008-08-18 15:21:46

declared players?

P1nky

2008-08-18 16:47:44

im using srl player form

Santa_Clause

2008-08-19 05:26:48

Oh God, please attempt to use some form of standards.

NiCbaZ

2008-08-19 06:58:24

From: Santa_Clause
Oh God, please attempt to use some form of standards.


please stay on topic… and when you are using the player from you still use declare players.

P1nky

2008-08-19 21:08:37

Players[1].Strings[1] := ComboBox1.Text;
Players[1].Strings[3] := Chop.Text;
//oak or willow or tree or all (LOWERCASE)!
Players[1].Active := true;

thats my declare player do i need to put nickname too?

Method

2008-08-19 23:31:19

From: ~~Joker~~
Players[1].Strings[1] := ComboBox1.Text;
Players[1].Strings[3] := Chop.Text;
//oak or willow or tree or all (LOWERCASE)!
Players[1].Active := true;

thats my declare player do i need to put nickname too?


If you don't include a nickname field, any script will have trouble finding randoms. That may or may not be why you're receiving an error, but you should always include it anyways. Also make sure your player starts logged out so the NickNameTPA can be created when you call LoginPlayer.

MylesMadness

2008-08-20 21:35:41

From: NiCbaZ
please stay on topic… and when you are using the player from you still use declare players.
What are you talking about, no you don't.

P1nky

2008-08-21 14:30:30

method,
doesnt the form already include the nick or do i have to add it inside the declare players?

Method

2008-08-21 19:03:31

From: ~~Joker~~
method,
doesnt the form already include the nick or do i have to add it inside the declare players?


The SRLPlayerForm has a field for a player's nickname, yes. Your piece of code pasted earlier suggests that you don't use it, though (though I certainly may be wrong).

P1nky

2008-08-22 20:20:36

yeah im confuse lloll ima just take the srl player form out

Santa_Clause

2008-08-23 05:26:48

From: NiCbaZ
please stay on topic… and when you are using the player from you still use declare players.


Firstly, it was on the topic of his code…so don't attempt to enforce the rules on me.

And, I still don't understand why we're discussing the SRLPlayerForm when there's a runtime error.

P1nky

2008-08-23 13:47:22

than whats the cause i thought it be the srlplayerform