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