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

Hidden 'File Not Found'

Started by LeviM, 16 February 2015 - 09:07 PM
LeviM #1
Posted 16 February 2015 - 10:07 PM
When running my program after I log in a quick 'file not found' flashes in the middle of the screen before continuing. Could somebody look at the code and find what it's trying to run. To run the programs you will have to have two computers, both connected by wired modem (modems must be on top). One computer will be the server and one computer will be the client. The servers files can be found here and the client's files can be found here. The account name is 'Default' and the password is 'password'. Thank you for your help!
LeviM #2
Posted 16 February 2015 - 10:19 PM
Also, I shouldn't be able to terminate the program but I can; however when I do I get an error.

startup:66: attempt to compare nil with number
Bomb Bloke #3
Posted 16 February 2015 - 10:31 PM
When running my program after I log in a quick 'file not found' flashes in the middle of the screen before continuing.

Which of the two programs does this?

Perhaps try putting in some random print statements to help you determine exactly which line is triggering this.

Also, I shouldn't be able to terminate the program but I can; however when I do I get an error.

Less a case of "terminate works" and more a case of "terminate crashes the script, effectively making it work".

os.pullEventRaw returns terminate events, and does so regardless as to what filter you put on it. For example, if you do:

os.pullEvent = os.pullEventRaw

.
.
.

local data = {os.pullEvent("mouse_click")}

… then you would still need to manually check that data[1] ~= "terminate", or that data[1] == "mouse_click", before proceeding.
InDieTasten #4
Posted 16 February 2015 - 10:33 PM
Sorry for being lazy myself, but I would try to put some prints and sleeps over your code to locate the cause. also look at the error messages itself. Line 66 of your startup compares nil with a number. Just look at the line and see, what operand is nil and fix the issue
LeviM #5
Posted 16 February 2015 - 11:08 PM
I have solved the terminating error thanks to InDieTasten but I have yet to solve the file not found problem.

I have created a CCEmuRedux session if it helps anybody test the program. You can find it here.
Edited on 16 February 2015 - 10:15 PM