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.

DarkBASIC Professional Discussion / Variables and decimals

Author
Message
urgent help!
15
Years of Service
User Offline
Joined: 28th Sep 2010
Location:
Posted: 14th Dec 2010 21:03
So. I have a variable like (speed = 0.1) Excepet that when I plug it into the move object command (if upkey()=1 then move object 1,speed) it doesn't work. However if I speed = anything higher then 1, it will work. Why is this?
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 14th Dec 2010 21:11
you must declare speed as a float, by either using speed# instead of speed or by defining it.

speed as float

Login to post a reply

Server time is: 2026-07-21 07:03:31
Your offset time is: 2026-07-21 07:03:31