Dumb-founded by stubborn type

Blitz3D Forums/Blitz3D Programming/Dumb-founded by stubborn type

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Can anybody with a keen set of eyes tell me what's wrong with this code below.

It's simply a Type which is being created and having variable values assigned to it.

There is a random problem whereby the Type-variable fails or refuses to take the value assigned to it. It always comes up zero no matter if I manually tell it it equals a number or if it is given it from a simple previous calculation.

However the next loop through the creation process it will assign the value correctly before choosing to fail at some other point again. I've tried debugging and looked at all the variables etc.. all values are exactly as they should be except this part of the Type.

Can anybody tell me please if I am doing something against protocol here? I have been at this for 3 days before wittling it down to this one small part of the code - weep.

( as a side note - the very same piece of code which assigns the 'Y' values for the type always works without fail - it comes directly after this part!!! Sniff!)

x1#=5.503 ; I've just assigned a value for simplicity sake

x2#=16.5674


If doclones\cx1# And doclones\cx2# < 0

Select True

Case doclones\cx1# > doclones\cx2#
doclones\platx_distance# = X2# - X1#

Case doclones\cx1# < doclones\cx2#
doclones\platx_distance# = X1# - X2#

default
doclones\platx_distance# = 777

End Select

EndIf


if count =4 then Stop ; just for my debugging with this problem