Hi,
Consider the code:
function p(...)
print(...)
str=""
for a,b in ipairs(arg)do
str=str..b.." "
print(a)
end
print(str)
end
and then calling:
p(1,2,3,4)
will print the following as expected from call to print in first line
1 2 3 4
And then returns with the following error
stdin:1: bad argument #1 to 'ipairs' (table expected, got nil)
stack traceback:
[C]: in function 'ipairs'
stdin:1: in function 'p'
stdin:1: in main chunk
[C]: ?
This function works fine if I remove the print(…) in the first line.
I am using lua 1.4 and tested this in Ubuntu-64 11.10 and Windows 7 64-bit
Can anyone help me on this issue please?
Regards,
Hamed Rafi