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