PDA

View Full Version : Just Started using Stats - Problem



hamster31
12-15-2011, 04:26 AM
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
12-15-2011, 04:55 AM
Ah yes. You must set up Stats first:

SetupSRLStats(ScriptID, SRLStats_Username, SRLStats_Password);

hamster31
12-15-2011, 05:39 AM
Ah yes. You must set up Stats first:

SetupSRLStats(ScriptID, SRLStats_Username, SRLStats_Password);


Tried it...same thing :(

Flight
12-15-2011, 05:57 AM
Did you also do SetupSRL & DeclarePlayers in the beginning of the script? I think this must come before SetupSRLStats.

hamster31
12-15-2011, 07:45 AM
yes i did...my code is up in my signature :( idk why its not working

Kyle Undefined
12-15-2011, 02:23 PM
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
12-15-2011, 07:41 PM
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
12-15-2011, 07:55 PM
Use WriteLns to debug it.

hamster31
12-15-2011, 09:18 PM
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
12-15-2011, 09:45 PM
The bot has to run for 5? 15? minutes before the stats upload, I believe.

hamster31
12-15-2011, 09:49 PM
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
12-15-2011, 09:53 PM
Needs the credentials to push the vars.

hamster31
12-15-2011, 09:59 PM
ok thank you :)