Author Topic: Hub Share Distributon Graph Script Lua 5.X  (Read 1241 times)

0 Members and 1 Guest are viewing this topic.

Offline RPGamer

  • Junior Member
  • **
  • Posts: 15
  • Karma: +0/-0
Hub Share Distributon Graph Script Lua 5.X
« on: 07 March, 2016, 07:21:14 »
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 .
« Last Edit: 07 March, 2016, 18:35:09 by RPGamer »

PtokaX forum

Hub Share Distributon Graph Script Lua 5.X
« on: 07 March, 2016, 07:21:14 »

Offline the-master

  • Triple Ace
  • **
  • Posts: 216
  • Karma: +10/-15
Re: Hub Share Distributon Graph Script Lua 5.X
« Reply #1 on: 07 March, 2016, 16:48:50 »
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.
« Last Edit: 07 March, 2016, 16:55:06 by the-master »
keep on sharing :)
dchub://kickincountryhub.no-ip.org

Offline RPGamer

  • Junior Member
  • **
  • Posts: 15
  • Karma: +0/-0
Re: Hub Share Distributon Graph Script Lua 5.X
« Reply #2 on: 07 March, 2016, 18:40:14 »
@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!

PtokaX forum

Re: Hub Share Distributon Graph Script Lua 5.X
« Reply #2 on: 07 March, 2016, 18:40:14 »