Need help getting script to work on OS X

I’m one of those Mac users that forgets to eject any cds I may have in the CDRom drive.
I created this script in OS 9 to ask if I had, and if I had not the script would do it for me.

display dialog "Did you remember to eject your CD?" with icon ¬
	stop buttons {"No", "Yes"} default button "Yes"
set button_choice to button returned of result
if button_choice is "No" then
	beep 1
	tell application "Finder"
		«event fndrptwy» (every disk whose ejectable is true)
	end tell
end if

And it works just fine. But when I tryed to get it to run in OS X I get the following error:

Can anyone tell me what this error means and help me to fix the issue, please?

Model: Power Mac G3
AppleScript: 1.8.1
Browser: Firefox 1.0.8
Operating System: Mac OS X (10.0.x)

Hi ghostdragon

not sure of the error, some of the gurus will no,

give this a go, works for me.

display dialog “Did you remember to eject your CD?” with icon ¬
stop buttons {“No”, “Yes”} default button “Yes”
set button_choice to button returned of result
if button_choice is “No” then
beep 1
do shell script “drutil eject”
end if

Hi

you can say this as well!

tell application "Finder"
	eject every disk
end tell

which will umount any volume as well as kick out a cd/dvd thats in your machine.

this will work also like budgies shell script:

do shell script "drutil tray open"

I think «event fndrptwy» was the event code for the Finder’s former ‘put away’ command, which was similar to ‘eject’ and hasn’t been carried over to OS X.