Im haveing problems comparing 2 variables... if you have a look at line 37 (if Doors(zz).dooropen=true) it doesnt work
if i change the code to 'if 1=Doors(zz)' then it works...
Its starnge as the variable true is set to 1 and is global...
Any idea's on why this happens?
Cheers
set display mode 1024, 768, 32
sync on
sync rate 70
randomize timer()
`Variables...
global true as boolean : true=1
global false as boolean : false=0
TYPE Door
DoorOpen as byte
DoorTimer as integer
ENDTYPE
global dim Doors(100) as Door
_game()
end
Function _game()
ink RGB(255,255,255),rgb(0,0,0)
for zz=1 to 6
Doors(zz).doortimer=(timer()/100)+(rnd(60)+30)
Doors(zz).dooropen=rnd(true)
next zz
do
cls
time=timer()/100
text 100,100,"Time: " + str$(time)
for zz=1 to 6
text 100,100+(zz*20),"DoorTimer: " + str$(Doors(zz).doortimer)
text 100,110+(zz*20),"DoorOpen: " + str$(Doors(zz).dooropen)
if Doors(zz).doortimer