Hub Share Distributon Graph Script Lua 5.X
 

Hub Share Distributon Graph Script Lua 5.X

Started by RPGamer, 07 March, 2016, 07:21:14

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RPGamer

My first script :passifier:, there might be some untested errors.  :spike:
In short, this script categorises hub users into share size groups and then displays a horizontal bar graph. Default share size groups can be modified and correspondingly you'd need to change the logical if-elseif block inside the graphbuilder function. Each "-" in the bar graph corresponds to 1 user. You can also change the reply type option by changing tSettings.bPmOnly .

the-master

#1
lol, you forgot to set users to 0 somewhere.., every time graph is called it shows more users  ;)
         ShareSizes[1] = ShareSizes[1] + 1
ShareSizes[1] to [11] needs reset before counting.
keep on sharing :)

RPGamer

@the-master
Hence the pacifier emoticon in my original post  :lol:
I've corrected it by initialising the ShareSizes every time it is called. Considering the fact that I knew nothing about Lua about 3-4 months ago, this is like a milestone for me. Any other changes that you'd like in the script, do notify me!  :D
I know quite a bit about c++ and now python too, but Lua looks like an alien to me. Will now learn about file handling so that I can make more interesting scripts!

SMF spam blocked by CleanTalk