Code: Select all
function main()
printf("\n\nInitializing..");
function test()
while( not keyPressed(key.VK_F5) ) do
print("test1");
rest(50);
end
end
registerTimer("test", secondsToTimer(2), test);
-- Main loop
while( not keyPressed(key.VK_F5) ) do
print("test2");
rest(50);
end
end
main();
Code: Select all
Initializing..
test1
test2
test1
test2
test1
test2
test1
test2
test1
test2
Edit: maybe this belongs to the help & support section