Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Problem: Negative stepping in a for next loop

Author
Message
cabbage
23
Years of Service
User Offline
Joined: 18th Jun 2003
Location: United Kingdom
Posted: 25th Jun 2003 03:14
This one has been bugging my friend and I for ages now and we cant find a way past it any solutions greatly appreciated (or is it just a bug?)

Scene: moving an image across the screen.

If I use for n=x1 to x2 step -5, where x1 > x2

everything works dandy and the image moves smoothly from right to left, but....

If I use a variable to define the step, say m as in;

for n=x1 to x2 step m , where x1 > x2 and m= -5

instead of the image moving smoothly across the screen it just warps instantly from position x1 to x2. This is baffling me. I've tried it in other languages (on the old Amiga) and it works fine - just doesnt work in DBPro.
spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 25th Jun 2003 03:20
It's a bug I'm afraid - found it months ago but can't find original post.

Don't do drugs kids. There is a time and place for everything. It's called college.
cabbage
23
Years of Service
User Offline
Joined: 18th Jun 2003
Location: United Kingdom
Posted: 25th Jun 2003 03:30
Ah sheesh

Thanks for the inf sonic. I hope it gets fixed soon as its gonna screw me project up no end.

spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 25th Jun 2003 03:35
Found original post:

http://www.darkbasicpro.com/apollo/view.php?t=6701&b=1

This was back in patch 3.1 and STILL not fixed!!!

Don't do drugs kids. There is a time and place for everything. It's called college.
cabbage
23
Years of Service
User Offline
Joined: 18th Jun 2003
Location: United Kingdom
Posted: 25th Jun 2003 04:16
I hope its fixed in patch 5 - otherwise I get the feeling there's some flabby coding coming to get round this issue

.... and we all HATE flabby code

Lee get it fixed please

spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 25th Jun 2003 04:42
I have just emailed Lee about it.

As he doesn't read everything, he likes to be emailed bugs. It is highly likely he didn't even know the problem existed!

Don't do drugs kids. There is a time and place for everything. It's called college.
indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 25th Jun 2003 05:09
yeah it wont work for negative values but works for positive values ok




bug.

spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 25th Jun 2003 14:36
Lee has just emailed me to say it has been fixed in upgrade 5.

Hooray!

Don't do drugs kids. There is a time and place for everything. It's called college.
cabbage
23
Years of Service
User Offline
Joined: 18th Jun 2003
Location: United Kingdom
Posted: 25th Jun 2003 16:13
Woot

Login to post a reply

Server time is: 2026-07-06 06:43:27
Your offset time is: 2026-07-06 06:43:27