Line 434: attempt to index ? (a nil value) (only when it's doing files[4])
Started by mibac138, Apr 22 2013 08:03 AM
10 replies to this topic
#1
Posted 22 April 2013 - 08:03 AM
#2
Posted 22 April 2013 - 09:36 AM
Did you ever think: it might be too many?..
Really, you have 412 lines of text you want to print. Hmm...
Really, you have 412 lines of text you want to print. Hmm...
#3
Posted 22 April 2013 - 09:43 AM
your for loop is wrong
EDIT 2: Ok time for a suggestion... add this code between 433 and 434...
Doesn't look like it is printing to me, looks like it is being saved to file...
for i=0,#files doin Lua table indexes start at 1 so it should be
for i = 1, #files doEDIT: Nvm just saw the if i ~= 0 then, although what is the point, just make the change I suggested.
EDIT 2: Ok time for a suggestion... add this code between 433 and 434...
if not file then
print('Here is the problem... This file: '..tostring(files[i].dir)..' could not be opened for write')
end
Engineer, on 22 April 2013 - 09:36 AM, said:
Really, you have 412 lines of text you want to print. Hmm...
Edited by theoriginalbit, 22 April 2013 - 09:52 AM.
#4
#5
Posted 23 April 2013 - 01:19 AM
theoriginalbit, on 22 April 2013 - 09:43 AM, said:
your for loop is wrong
EDIT 2: Ok time for a suggestion... add this code between 433 and 434...
Doesn't look like it is printing to me, looks like it is being saved to file...
for i=0,#files doin Lua table indexes start at 1 so it should be
for i = 1, #files doEDIT: Nvm just saw the if i ~= 0 then, although what is the point, just make the change I suggested.
EDIT 2: Ok time for a suggestion... add this code between 433 and 434...
if not file then
print('Here is the problem... This file: '..tostring(files[i].dir)..' could not be opened for write')
end
Engineer, on 22 April 2013 - 09:36 AM, said:
Really, you have 412 lines of text you want to print. Hmm...
Ok, but what should i do now? I don't know how to repair it :C
#7
Posted 23 April 2013 - 01:34 AM
Quote
Well whichever file it was that couldn't be opened try different name or location, there has to be a reason why it cannot be created.
Ok, I tested it and saved the API to file "testing" and it's works but how can I fix that I can't save it to ".main/.apis/.OS"?
#8
Posted 23 April 2013 - 01:37 AM
create the folders '.main' and '.apis' first. I'd assume thats what the problem is, the directories don't exist.
#9
Posted 23 April 2013 - 01:39 AM
They exists (they are created by "Step 1 (i=0))! and this is the problem
#10
Posted 23 April 2013 - 01:51 AM
try making them with fs.makeDir instead of the shell.run
short of that, I'm not too sure, I'll investigate some more
EDIT: ok this is the problem ".main/.programs/.apis/.OS" there is not .apis folder in the .programs folder
short of that, I'm not too sure, I'll investigate some more
EDIT: ok this is the problem ".main/.programs/.apis/.OS" there is not .apis folder in the .programs folder
Edited by theoriginalbit, 23 April 2013 - 01:55 AM.
#11
Posted 23 April 2013 - 01:59 AM
theoriginalbit, on 23 April 2013 - 01:51 AM, said:
try making them with fs.makeDir instead of the shell.run
short of that, I'm not too sure, I'll investigate some more
EDIT: ok this is the problem ".main/.programs/.apis/.OS" there is not .apis folder in the .programs folder
short of that, I'm not too sure, I'll investigate some more
EDIT: ok this is the problem ".main/.programs/.apis/.OS" there is not .apis folder in the .programs folder
Oh, thank you very much! It's should be ".main/.apis/.OS" instead of ".main/.programs/.apis/.OS" really thank you very much!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











