@wyatt822
Your codes are still in DBP version, it won't run in DBC as it is.
Back on topic, there are better options than using a floodfill to get the same effect.
I think it's a good idea if you learn how to do Buttons with colorkey first.
I'll give you an example of how it works:
set display mode 640,480,32
sync on
sync rate 0
REM Setting up Colorkey
create bitmap 1,640,480
REM Red box
ink rgb(255,0,0),0
box 290,200,400,320
REM Yellow Box
ink rgb(0,255,0),0
box 230,250,350,340
set current bitmap 0
REM Background Image
ink rgb(155,155,155),0
box 290,200,400,320
ink rgb(255,255,255),0
box 290+1,200+1,400-1,320-1
ink rgb(155,155,155),0
box 230,250,350,340
ink rgb(255,255,255),0
box 230+1,250+1,350-1,340-1
get image 1,0,0,640,480,1
REM ***********************************************************************
REM * Main Loop *
REM ***********************************************************************
do
mc = mouseclick()
mx = mousex()
my = mousey()
if mc = 1
set current bitmap 1
c = point(mx,my)
set current bitmap 0
ink rgb(255,255,255),0
if c = rgb(255,0,0) then text 0,0,"RED"
if c = rgb(0,255,0) then text 0,0,"GREEN"
endif
paste image 1,0,0,1
sync : cls
loop
Use the mouse and click on the boxes.