|
-----Original Message-----
From: owner-lua-l@tecgraf.puc-rio.br [mailto:owner-lua-l@tecgraf.puc-rio.br]On Behalf Of Volkan Civelek
Sent: Tuesday, October 30, 2001 9:23 AM
To: Multiple recipients of list
Subject: questionHi,
This is my first email and fyi i am very new born in Lua.
Now the question is;
why does the below code gives me
"error: bad argument #1 to `write' (string expected, got nil)
stack traceback:
1: function `write' [C]
2: main of file `ask.lua' at line 10Error: Script failed"
this???
--case.lua
function foo (rt, from, s)
for i=1,10 do
tinsert (rt, from, strsub(s,i,i+1))
end
end
local combi = {}
local var1 = {"1234567890"}
foo(combi, 34, var1[1])
write (combi[34], "\n")
write (combi[35], "\n") --this guy has a problem--EOF
and combi[34] writes 0 ??
TIA
Volkan
Do You Yahoo!?
Make a great connection at Yahoo! Personals.