So, I'm trying to input a UDT into a function like so:
SYNC ON
SYNC RATE 40
TYPE bank
ttl# AS FLOAT
disp# AS FLOAT
ENDTYPE
pl_bank AS bank
fl#=0.0500000
pl_bank.ttl#=1000.0000000
DO
CLS
pl_bank=correct_bank(pl_bank)
PRINT STR$(pl_bank.disp#)
PRINT fl#
IF UPKEY()+DOWNKEY()+LEFTKEY()+RIGHTKEY()+SPACEKEY()=0 THEN hold=0
SYNC
LOOP
FUNCTION correct_bank( in AS bank )
dist=in.disp#-in.ttl#
IF ABS(dist)>100
IF dist<0 THEN INC in.disp#,100.0000000
ENDIF
ENDFUNCTION in
Notice that both "in"(from the function) and "pl_bank"(from the code) have the same defined type. Yet the compiler gives me an error reading: "Both user-defined type values must be the same at line 16" (trying to set them to the same thing).
Is this just not supposed to work? is there something I'm missing?