I hope you can help me with that because AluminiumLua seems a great project ...
I try this :
-- Fibonacci series
function Fibonacci(n)
if (n == 0) then
return (0)
elseif (n == 1) or (n == 2) then
return (1)
end
local a, b, c
a=0
b=1
for i=2,n,1 do
c=a+b
a=b
b=c
end
return b
end
print("Fibonacci(1 2 3 ... 12): ")
for n = 1,12,1 do
print(Fibonacci(n) .. " ")
end
and I get the following error :
Error in fib.lua(7,3): syntax error
Although this code works fine with some other parser like Luainterface ....
Hi,
I hope you can help me with that because AluminiumLua seems a great project ...
I try this :
-- Fibonacci series
function Fibonacci(n) if (n == 0) then return (0) elseif (n == 1) or (n == 2) then return (1) end local a, b, c a=0 b=1 for i=2,n,1 do c=a+b a=b b=c end return b end
print("Fibonacci(1 2 3 ... 12): ") for n = 1,12,1 do print(Fibonacci(n) .. " ") end
and I get the following error :
Error in fib.lua(7,3): syntax error
Although this code works fine with some other parser like Luainterface ....
thanks in advance for any help, Domi.