reset password
Author Message
evik89
Posts: 32
Posted 12:23 Nov 03, 2015 |

(place-image IMAGE-of-UFO (/ WIDTH 2) current-state
(empty-scene WIDTH HEIGHT)))

it keeps giving me the error of:

 WIDTH: unbound identifier in module in: WIDTH

vsluong4
Posts: 87
Posted 13:50 Nov 03, 2015 |

Well, for starters, it looks like you have an extra parenthesis

evik89
Posts: 32
Posted 13:52 Nov 03, 2015 |

No the whole thing is:

(define (draw-a-ufo-onto-an-empty-scene current-state)
(place-image IMAGE-of-UFO (/ WIDTH 2) current-state
(empty-scene WIDTH HEIGHT)))

vsluong4
Posts: 87
Posted 14:02 Nov 03, 2015 |

I think place-image takes 4 arguments

1: image (IMAGE-of-UFO)

2: y position (/ WIDTH 2)

3: x position (current-state)

4: canvas (empty-scene WIDTH HEIGHT)

 

so it looks like you're passing current-state as the x position

not quite sure how you designed your code, but I don't think current-state is a number

rabbott
Posts: 1649
Posted 20:05 Nov 03, 2015 |

If this is the problem I looked at in class the problem was what the error message said: WIDTH was not defined.