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 / I should be shot and put out to pasture...

Author
Message
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 26th Oct 2003 01:32
can someone brighter than myself please tell me why this function is only returning zero...



I suspect the line "fltRNDY=intTemp/100"
not liking the int to float conversion?

fltRNDY is a global float, btw

thanks

-RUST-
Proteus 1935
22
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Brazil
Posted: 26th Oct 2003 01:36 Edited at: 26th Oct 2003 01:37
How about ?



Currently coding: 3d-2d latitude/longitude
Recent coding: elliptical orbits
Proteus
Easily Confused
23
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 26th Oct 2003 01:53
Almost there Proteus, as CattleRustler is using locals in this function then he's missed one:



I recommend that you move the Randomize Timer() outside the function, you only need to call that once.

Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 26th Oct 2003 01:55 Edited at: 26th Oct 2003 01:56
@user
nope - still just zero's

thanks tho

-RUST-
Proteus 1935
22
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Brazil
Posted: 26th Oct 2003 01:55 Edited at: 26th Oct 2003 01:58
Quote: "
fltRNDY is a global float, btw
"


It works here...


Currently coding: 3d-2d latitude/longitude
Recent coding: elliptical orbits
Proteus
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 26th Oct 2003 01:56
@EC I had that before I posted - no go

-RUST-
Easily Confused
23
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 26th Oct 2003 01:57
Ah! I see.

Not my day today, making mistakes all over the place

Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 26th Oct 2003 01:59
@EC no wait YOU ARE CORRECT!

i had local fltRNDY but missing 100.0 on other line
now it works!

THANKS ALL
(maybe I shouldn't be shot after all)

-RUST-

Login to post a reply

Server time is: 2026-07-26 15:29:22
Your offset time is: 2026-07-26 15:29:22