Author Topic: [XP][VX][VXA] Script & Line Counter  (Read 2425 times)

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6591
  • LV: 407
  • Gender: Male
    • View Profile
[XP][VX][VXA] Script & Line Counter
« on: October 07, 2013, 02:50:29 PM »
Script & Line Counter
Authors: gameus
Version: 1.1
Type: Line Counting Utility
Key Term: Scripting Tool

Introduction

Ever wonder how many lines of code are in your game? Or just in a particular script? Look no further! This script counds all the lines of code, comments and empty lines for every script in your project. It writes everything to a file. Also counts the number of scripts in your project.

Features

  • Counts code, empty lines, and comments and total scripts
  • Can omit scripts
  • Can count only certain scripts
  • Writes everything to a file
  • Now detects quote blocks (=begin =end)

Screenshots

The result of a default project scan (with this script added).
(click to show/hide)

Demo

N/A

Script

(click to show/hide)

Instructions

While this can be placed anywhere, it's recommended to be placed at the very top. It's also recommended that you put "{OMIT}" in the name of the script to not count it's code. Explanation of script and options (including omitting scripts and counting only select scripts) are all in the script itself.

Compatibility

Will literally work with anything.

Credits and Thanks

  • gameus ~ For making it.
  • LiTTleDRAgo ~ Inspiring me when he asked how to count lines in a script

Author's Notes

Lines that look like this
Code: (ruby) [Select]
attr_reader: @variable # insert comment hereWill be treated as a line of code since the comment is not in front.

All scripts that aren't counted will be marked in the file as "Skipped"

This script counts every comment, line, and empty line for every script

All omitted scripts will still be counted towards total scripts, however, it will not contribute to Total Lines, Comments, or Empty Lines

Empty lines that are in quote blocks (=begin =end) will still be counted as empty lines

Final note. This is a useless utility, it doesn't do anything functional for your game, only counts code.
« Last Edit: October 08, 2013, 02:25:02 AM by gameus »

Offline LiTTleDRAgo

  • Astral Trancist
  • *****
  • Posts: 851
  • LV: 517
  • Gender: Male
    • View Profile
    • ~
Re: [XP][VX][VXA] Script & Line Counter
« Reply #1 on: October 07, 2013, 04:30:54 PM »
thanks for the script :D

btw just let you know,
it seems this script still counts =begin & =end as code
« Last Edit: October 07, 2013, 04:32:54 PM by LiTTleDRAgo »

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6591
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP][VX][VXA] Script & Line Counter
« Reply #2 on: October 08, 2013, 02:17:02 AM »
Updated to 1.1. Now detects quote blocks (=begin =end) Thanks Drago. :3