SRL Archive - SRL Stats

How to actually add stats to a script?


Coh3n

2011-01-09 18:14:05

I've been trying for the last couple hours, and I can't seem to get it to work properly. At first I was getting an invalid username/password error, but once I put in my user ID, the error went away.

stats_Commit doesn't ever seem to be returning true. Maybe I'm missing a step, but I can't seem to find anywhere that actually says how to do this. :p All I'm doing is this, for example:

stats_IncVariable('Total Loads', 1);
if (stats_Commit) then
Writeln('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA');
Any help? :)

E: Oh and yes, I call SetupSRLStats at the beginning of the script.

Gu3st...

2011-01-09 18:41:47

Tried debugging the stats_Commit function?

Coh3n

2011-01-09 18:44:03

From: Zyt3x
Tried debugging the stats_Commit function?

I don't think there's anything wrong with it because Dgby and Wizzup have made commits to the stats.

Gu3st...

2011-01-09 18:46:51

From: Coh3n
I don't think there's anything wrong with it because Dgby and Wizzup have made commits to the stats.
Does your script get past this (in stats_Commit)
  if Worked < 1 then
Exit;

Coh3n

2011-01-09 18:49:12

I'm assuming so because I was getting the invalid user/pass.

And I'm trying to add this to MSI. :p

Dgby714

2011-01-09 18:52:42

From: Coh3n
I don't think there's anything wrong with it because Dgby and Wizzup have made commits to the stats.


I didn't use SRL's stats include, and I don't think Wizzup? did ether.

Coh3n

2011-01-09 18:53:14

From: Dgby714
I didn't use SRL's stats include, and I don't think Wizzup? did ether.

… was it even tested before committed?

Narcle

2011-01-09 18:55:49

Did you get 'Total Loads' added to script as variable? Oh and I bet your password has caps in it, we might have to change the system. (before if you passed caps to the api it wouldn't work so I had it change your name/pass to lowercase, I believe Wizzup has this fixed now though)

edit: and yes this was tested…

Coh3n

2011-01-09 18:57:16

From: Narcle
Did you get 'Total Loads' added to script as variable? Oh and I bet your password has caps in it, we might have to change the system. (before if you passed caps to the api it wouldn't work so I had it change your name/pass to lowercase, I believe Wizzup has this fixed now though)

Yeah I added it myself, and I was just using that as an example. I have several variables being "Inc'd". Maybe I have the names wrong? I'm assuming they have to be the same as they appear on the site.

E: Sorry, it's not total loads, it's Loads Done.

E2: Oh, and my password is just numbers.

Wizzup?

2011-01-10 01:44:34

Dgby714 just pointed out that it's probably commiting to the wrong site… Tried setting it to stats.villavu.com/api/commit instead of old.villavu.com/stats/api/commit?

Dgby714

2011-01-10 01:44:40

stats.simba has the wrong stats url it needs to be changed to
http://stats.villavu.com/api/commit

E: Ninja…

Coh3n

2011-01-10 01:46:22

Ah alright I'll change that, test it and commit as soon as I can (that is, if it isn't done already).

E: Works and committed. :)