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 / Drawing line works, dots doesn't? Help please :)

Author
Message
enderleit
19
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 16th Nov 2011 08:51
I'm working on a game atm. and in that game I have this piece of code, to draw some vertical ropes:



I don't use both of those "blocks" at the same time, but I put them there so you can see both.

The line code works fine, but the dot code does not. First of all it doesn't actually draw any dots to the screen, and when it reaches the top of the screen the program crashes(freeze).

I have tried it with DBPro's regular drawing commands, and the same thing happens...

Any ideas?

enderleit
19
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 16th Nov 2011 09:01
OK! Nevermind... I figured it out!

Apparently it had something to do with the Rope(i).y and y2 values were floats, so I changed it to:

for y3=int(Rope(i).y) to int(Rope(i).y2)

and now it works fine...

Thx anyway...

Login to post a reply

Server time is: 2026-07-10 03:58:35
Your offset time is: 2026-07-10 03:58:35