In case you're still interested, I guess the version using a function doesn't work as you expect because the variable 'timer' is local to the function and will thus be reset to zero every time the function is called. 'timer' will retain it's value when the code is moved into the main code.
Bug or my fault? (types related)
Blitz3D Forums/Blitz3D Beginners Area/Bug or my fault? (types related)The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.