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

Weirdest Error/Glitch Ever (I don't even know)

Started by PixelFox, 19 April 2015 - 03:13 PM
PixelFox #1
Posted 19 April 2015 - 05:13 PM
There is a glitch in my code…and I can not fix it. It is an Explorer App. And when I click on a file, it says "No Such Program", except for if I haven't clicked on a folder yet. This is the code:
http://pastebin.com/M47EVgyW
Take that code and use it, click on a folder, like rom. Then click on a file. and you get "No such Program".
I don't know what the reason is. But it seems to happen, if there was a fix, that'd be great!
MKlegoman357 #2
Posted 19 April 2015 - 05:16 PM
Have you tried to look at the code yourself and debug it?


shell.run(directory.."/"..Exlist[i].Name) <-- here
PixelFox #3
Posted 19 April 2015 - 05:16 PM
Yes, I did.
Oh… :(/>
Man, I didn't see a typo. I feel like an idiot. But It still says "No such program"
Edited on 19 April 2015 - 03:17 PM
MKlegoman357 #4
Posted 19 April 2015 - 05:17 PM
And what was the value of 'Exlist.Name'?
PixelFox #5
Posted 19 April 2015 - 05:18 PM
And what was the value of 'Exlist.Name'?
It was accually list.Name, that was a typo. But, it's the files name. like "Startup"
MKlegoman357 #6
Posted 19 April 2015 - 05:24 PM
Have you checked the output of:


print( directory.."/"..list[i].Name )
Edited on 19 April 2015 - 03:24 PM
PixelFox #7
Posted 19 April 2015 - 05:25 PM
Have you checked the output of:


print( directory.."/"..list[i].Name )
No, but I've done: print(list.Name)

EDIT:
I clicked Programs.
and I got:
rom/programs

and: Why is google a user on here?
Edited on 19 April 2015 - 03:28 PM
PixelFox #8
Posted 19 April 2015 - 05:33 PM
Uh, can you guys help pls.
Dragon53535 #9
Posted 19 April 2015 - 06:27 PM
If you used print(list.Name) and it printed out rom/programs, then the reason you're getting no such file is that directory is probably rom as well, so you're printing out rom/rom/programs
PixelFox #10
Posted 19 April 2015 - 06:32 PM
If you used print(list.Name) and it printed out rom/programs, then the reason you're getting no such file is that directory is probably rom as well, so you're printing out rom/rom/programs
I used print(directory.."/"..list.Name) and got "rom/programs"
Dragon53535 #11
Posted 19 April 2015 - 06:41 PM
And you're trying to shell.run rom/programs?

Edit, no i'm a derp

Edit2: What line is this print on?
Edited on 19 April 2015 - 04:48 PM
KingofGamesYami #12
Posted 19 April 2015 - 07:35 PM
It's on line 128 of the pastebin.

I'd recommend printing the directory too.
Dragon53535 #13
Posted 19 April 2015 - 07:47 PM
It's on line 128 of the pastebin.

I'd recommend printing the directory too.
He hasn't updated the pastebin from what he's given us. That pastebin is his first try and it was pasted on a guest account.
PixelFox #14
Posted 19 April 2015 - 08:10 PM
http://pastebin.com/yX2feEXi < This is the new code.
Edited on 19 April 2015 - 06:13 PM
HPWebcamAble #15
Posted 19 April 2015 - 08:11 PM
and: Why is google a user on here?

If I had to guess, I'd say its so that google can search the forums for results