Posted: Wed Dec 14, 2011 9:15 pm Post subject: [long_crash] in *.lua func
Hello.
Tried to make a wrapper increment, but turned out endlessly cycle.
This function will hang interpreter CEngine tightly.
So much so that it would be long to kill the process ..
(note: sorry if repeated, all the pages look not possible)
Code:
a = 0
i = 0
while i < 10 do
print(string.format("test: %d",inc2(a,i)))
if a > 10 then
break
end
-- a = a + 1 -- DEBUG: KILL CYCLE
inc(i,1) -- <- CRASHED!
end
-- FUNCs: increment
function inc2(arg1, arg2)
arg1 = arg1 + arg2
return arg1
end
function inc(arg1)
arg1 = arg1 + 1
return arg1
end
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum