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 / Originally posted on bug board...

Author
Message
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 18th Aug 2003 05:58
I originally posted on bug report board but I fugured I'd throw it out there for all of you nice people to see:

in a slot machine game I made I noticed the scoring routine was sometimes paying out when it shouldn't, I debugged and found a part of the code was returning values of zero when it shouldn't...

intstopval1=wrapvalue(object angle x(1))
intstopval2=wrapvalue(object angle x(2))
intstopval3=wrapvalue(object angle x(3))

I have 3 3d reels with different images on each of the ten faces, the code above is supposed to get the object angle (0-324 in 36 degree increments) and wrap the val to keep it in a total of 360 degrees then pass it into my variables. This all works fine and dandy but over time the third line starts returning Zero regardless of the actual angle, then the second line starts to do the same, then a few spins later the first line does the same - until I am returning 0 0 0 regardless of the actual angle. I have recreated this oddity many times, and seems to be dependent on repeated usage. I am wondering if their is a known bug in OBJECT ANGLE X, in WRAPVALUE, or in Nested Functions in general.

edit: Or am I dopey for mixing return types without implicit conversions?

Thanks in advance for any insight
RUSTLER
How do ya do there son
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 18th Aug 2003 21:08
CONFIRMED:

Turns out Wrapvalue() blows up when given an argument of 36000 or higher.

RUST-

How do ya do there son

Login to post a reply

Server time is: 2024-11-25 04:38:49
Your offset time is: 2024-11-25 04:38:49