This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
JoshhT's profile picture

Line Finder by JoshhT

Started by JoshhT, 14 October 2012 - 11:25 AM
JoshhT #1
Posted 14 October 2012 - 01:25 PM
Ever had a pesky error in a program you're writing, and it's on something absurd, like, line 205.
And you think to yourself, fuck counting down all those lines to that.

Well I present to you, my line finder program.
Simply type in the program location and line number, and it will show you exactly that line :)/>/>

I've seen some third party programs that allow you to "copy paste" text into the in game computer.
Or you could simply make a program to download from the pastebin website, and save to your in game computer :)/>/>

Here's the link to my code.
http://pastebin.com/raw.php?i=ui0xdsLy
It's completely open source, I'm not hiding anything.
No virus' here mate.

Please post here what you think of my program, any problems or whatnot, feel free to ask.
Or you could also type lineFinder help in your computer.
JoshhT #2
Posted 14 October 2012 - 02:49 PM
Removed my debug/testing logs :)/>/>
I forgot about them. Lol.
CodeMachine #3
Posted 24 December 2012 - 01:45 PM
Nice program! Find it quite useful… :D/>
pielover88888 #4
Posted 24 December 2012 - 02:07 PM
Um, but you don't have to count the lines until you hit pagedown far enough so you're near line 190 o_O
anyway, very useful :)/>
JoshhT #5
Posted 24 December 2012 - 10:11 PM
Nice program! Find it quite useful… :D/>
Cheers mate :)/>
Um, but you don't have to count the lines until you hit pagedown far enough so you're near line 190 o_O
anyway, very useful :)/>
For tekkit users, CC does not tell you what line you're currently on.
These are the people this program is aimed at.
remiX #6
Posted 25 December 2012 - 01:45 AM
Can I ask you what this cleanup function is for? Even after I changed
local fileLoc = cleanup()
to
local fileLoc = args[1]
it still found the exact line :)/>

Also, make it print the usage usage if you just type the program name with no arguments, etc. Indeed, very useful for tekkit players.
JoshhT #7
Posted 27 December 2012 - 02:37 PM
Can I ask you what this cleanup function is for? Even after I changed
local fileLoc = cleanup()
to
local fileLoc = args[1]
it still found the exact line :)/>

Also, make it print the usage usage if you just type the program name with no arguments, etc. Indeed, very useful for tekkit players.

Well if you read it, you'd discover it removes any quotation marks from the file location if the user puts any.
djblocksaway #8
Posted 27 December 2012 - 03:10 PM
nice :D/>