hello <div>I made a traffic light game</div><div>stops on red light</div><div>keep going on blue or orange light</div><div>when I press the run button, it works well.</div><div>but the error occur during making an executable</div>
<div>is there any solution for this?</div><div><br></div><div>the source code is here</div><div>=========</div><div><div>#lang scheme</div><div>(require 2htdp/universe)</div><div>(require 2htdp/image)</div><div><br></div>
<div><br></div><div>(define hero .);hero</div><div><br></div><div>(define width 300)</div><div>(define height 700) </div><div><br></div><div>(define bgscene (empty-scene width height))</div><div><br></div><div>(define x 16)</div>
<div>(define y 700)</div><div>(define lightcolor 0)</div><div>(define colorlast 10)</div><div>(define frame 0)</div><div>(define win 0)</div><div>(define colorchange 0)</div><div>(define blue 0)</div><div>(define red 0)</div>
<div>(define orange 0)</div><div><br></div><div>(define blueon (circle 10 "solid" "blue"))</div><div>(define blueoff (circle 10 "outline" "blue"))</div><div>(define orangeon (circle 10 "solid" "orange"))</div>
<div>(define orangeoff (circle 10 "outline" "orange"))</div><div>(define redon (circle 10 "solid" "red"))</div><div>(define redoff (circle 10 "outline" "red"))</div>
<div><br></div><div><br></div><div>(define (check status)</div><div> (cond [(< y 20) (set! win 1)]</div><div> [(<= colorlast 0) (begin (set! lightcolor(+ 1 lightcolor)) (begin (= (random 3) 0) (set! colorlast (if (= (modulo lightcolor 3) 1) (+ (random 56) 14) (random 56)))))]</div>
<div> [(= (modulo lightcolor 3) 0) (begin (set! blue 1) (set! red 0))]</div><div> [(= (modulo lightcolor 3) 1) (begin (set! blue 0) (set! orange 1))]</div><div> [(= (modulo lightcolor 3) 2) (begin (set! orange 0) (set! red 1))]</div>
<div> </div><div> )#t)</div><div>(define (tock status)</div><div> (set! frame (+ frame 1))(set! colorlast (- colorlast 1)) (display colorlast)(newline)status) </div><div><br></div><div>(define (keycheck status key)</div>
<div> (cond [(and (= (modulo lightcolor 3) 2)(equal? key "up"))(set! win 2)]</div><div> [(equal? key "up") (set! y (- y 3))]</div><div> [(equal? key "down") (set! y (+ y 3))]) status)</div>
<div>(define (draw status)</div><div> (cond [(= win 1)(place-image (text "clear!" 12 "blue") 150 350 bgscene)]</div><div> [(= win 2)(place-image (text "game over" 12 "blue") 150 350 bgscene)]</div>
<div> [else (place-image hero x y (place-image/align (beside (if (= blue 1) blueon blueoff) (if (= orange 1) orangeon orangeoff) (if (= red 1) redon redoff)) 150 350 "center" "center" bgscene))]))</div>
<div><br></div><div>(big-bang 0</div><div> (on-tick tock)</div><div> (check-with check)</div><div> (on-draw draw)</div><div> (on-key keycheck))</div></div><div>=========</div>