I'm working on my ccSQL project.
I get the error: ccsql:50: bad argument: string expected, got nil
Line 50 is in this case line 16.
Code for the function:
Stupid forum, breaking my indentation
Spoiler
And this is what executes it:
Spoiler
Posted 15 October 2013 - 03:48 AM
Posted 15 October 2013 - 04:06 AM
Posted 15 October 2013 - 06:10 AM
Posted 15 October 2013 - 07:21 AM
local lines = {}
local file = fs.open( "file", "r" )
for line in file.readLine do
table.insert( lines, line )
end
file.close()
This way you can easily find your lines; lines[ 1 ] is the first line. Now, you should keep this table for later one, so you dont have to open unneccesarily files.
Posted 15 October 2013 - 07:59 AM
local text = "Hi"
local info = {"Yes", 2}
print(#text)
-->> 2
print(#info)
-->> 2
print(#info[1])
-->> 3
Posted 15 October 2013 - 11:26 AM
wojbie, on 15 October 2013 - 06:10 AM, said:
0 members, 2 guests, 0 anonymous users