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 &quot;solid&quot; &quot;blue&quot;))</div><div>(define blueoff (circle 10 &quot;outline&quot; &quot;blue&quot;))</div><div>(define orangeon (circle 10 &quot;solid&quot; &quot;orange&quot;))</div>
<div>(define orangeoff (circle 10 &quot;outline&quot; &quot;orange&quot;))</div><div>(define redon (circle 10 &quot;solid&quot; &quot;red&quot;))</div><div>(define redoff (circle 10 &quot;outline&quot; &quot;red&quot;))</div>
<div><br></div><div><br></div><div>(define (check status)</div><div>  (cond [(&lt; y 20) (set! win 1)]</div><div>        [(&lt;= 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 &quot;up&quot;))(set! win 2)]</div><div>        [(equal? key &quot;up&quot;) (set! y (- y 3))]</div><div>        [(equal? key &quot;down&quot;) (set! y (+ y 3))]) status)</div>
<div>(define (draw status)</div><div>  (cond [(= win 1)(place-image (text &quot;clear!&quot; 12 &quot;blue&quot;) 150 350 bgscene)]</div><div>        [(= win 2)(place-image (text &quot;game over&quot; 12 &quot;blue&quot;) 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 &quot;center&quot; &quot;center&quot; 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>