SRL Archive - SRL Stats

Just Started using Stats - Problem


hamster31

2011-12-14 23:26:38

I just started using srl stats and added it to my script…the only problem is that when it calls

SRLRandomsReport;
stats_IncVariable('Summoning EXP (Gained)',xpgain);
stats_IncVariable('Summoning Pouches (Made)',pm);
Stats_Commit;

it gives me the error at the bottom. I do not know what to do…

Error: Out Of Range at line 391
HTTPClient[0] has not been freed in the script, freeing it now.

The Stats line 391 is


for i := rand_Leo to rand_Frog do
begin
// Update solved stats.
Increment := RandSolved[i] - stats_RandSolved[i]; // LINE 391!
if (Increment > 0) then
begin
stats_IncVariable(stats_RandNames[i] + ' (Solved)', Increment);
stats_RandSolved[i] := RandSolved[i];
end;
// Update unsolved stats.
Increment := RandFailed[i] - stats_RandFailed[i];
if (Increment > 0) then
begin
stats_IncVariable(stats_RandNames[i] + ' (Unsolved)', Increment);
stats_RandFailed[i] := RandFailed[i];
end;
end;

Flight

2011-12-14 23:55:52

Ah yes. You must set up Stats first:

SetupSRLStats(ScriptID, SRLStats_Username, SRLStats_Password);

hamster31

2011-12-15 00:39:30

From: Flight
Ah yes. You must set up Stats first:

SetupSRLStats(ScriptID, SRLStats_Username, SRLStats_Password);


Tried it…same thing :(

Flight

2011-12-15 00:57:18

Did you also do SetupSRL & DeclarePlayers in the beginning of the script? I think this must come before SetupSRLStats.

hamster31

2011-12-15 02:45:27

yes i did…my code is up in my signature :( idk why its not working

Kyle Undefined

2011-12-15 09:23:29

Hmm, so the code on IRC didn't work either. Try putting "WriteLn"s through out the whole thing and see what happens.

Also, have you tried taking out "SRLRandomsReport();"?

hamster31

2011-12-15 14:41:19

Yes i tried taking out SRLRandomReport and it did the same thing except show me the report lol….and what do you mean writeln through out what whole thing

Kyle Undefined

2011-12-15 14:55:52

Use WriteLns to debug it.

hamster31

2011-12-15 16:18:31

umm ok i removed srlrandomreport, it works fine now for some reason but my commits aren't updating…it doesn't even show that i even used it lol…my script number is 329 and i have added that in the main setup…

 ActivateClient;
DeclarePlayers;
SetupSRLStats(329, SRLStats_User, SRLStats_Password);
if not loggedin then

Kyle Undefined

2011-12-15 16:45:32

The bot has to run for 5? 15? minutes before the stats upload, I believe.

hamster31

2011-12-15 16:49:33

From: Camo Developer
The bot has to run for 5? 15? minutes before the stats upload, I believe.


ran it for 36 minutes straight…but umm does it have to have a username and password to get it to show up online or can the username and password be left empty…

Kyle Undefined

2011-12-15 16:53:42

Needs the credentials to push the vars.

hamster31

2011-12-15 16:59:24

ok thank you :)