Westbeam

Anmeldungsdatum: 22.12.2009 Beiträge: 760
|
Verfasst am: 03.06.2010, 08:15 Titel: Duplicated definition |
|
|
Ich suche schon seit gut einer Stunde nach dem Fehler, aber ich finde ihn nicht:
Code: | Dim Shared As Integer my,mx,button,num2
Dim Shared As Single Maus_X,Maus_Y,Maus_Taste,AltePos_X,AltePos_Y
declare sub Button(anfangx as integer,anfangy as integer,text as string,byval num as integer)
declare function Buttonpressed(byval num as integer)as integer
sub Button(anfangx as integer,anfangy as integer,text as string,byval num as integer)
dim as any ptr buttongfx,buttongfx2
dim as integer textz
textz=(Len(text)*8)+4
buttongfx=imagecreate(textz+1,19)
buttongfx2=imagecreate(textz+1,19)
line buttongfx,(0,0)-(textz,18),7,BF
line buttongfx,(0,0)-(textz,0),15
line buttongfx,(0,0)-(0,16),15
line buttongfx,(1,17)-(textz,17),8
line buttongfx,(textz-1,18)-(textz-1,1),8
line buttongfx,(0,18)-(textz,18),254
line buttongfx,(textz,18)-(textz,0),254
color 254
draw string buttongfx,(3,2),text
color 254
line buttongfx2,(0,0)-(textz,18),7,BF
line buttongfx2,(0,0)-(textz,0),254
line buttongfx2,(0,0)-(0,16),254
line buttongfx2,(1,1)-(textz,1),8
line buttongfx2,(1,1)-(1,17),8
line buttongfx2,(0,18)-(textz,18),15
line buttongfx2,(textz,18)-(textz,0),15
color 254
draw string buttongfx2,(4,3),text
color 254
Put (anfangx,anfangy),buttongfx,pset
if (Maus_X>anfangx and Maus_X<anfangx+textz and Maus_Y>anfangy and Maus_Y<anfangy+18 and Maus_Taste=1) then
Put (anfangx,anfangy),buttongfx2,pset
num2=num
end if
end sub
function Buttonpressed(byval num as integer)as integer
If num=num2 Then
Return num
Else
Return 0
End If
end function |
Es kommt immer die folgenden Fehler:
Zitat: | GUI.bas(4) error 4: Duplicated definition in 'declare sub Button(anfangx as integer,anfangy as integer,text as string,byval num as integer)'
GUI.bas(7) error 4: Duplicated definition in 'sub Button(anfangx as integer,anfangy as integer,text as string,byval num as integer)' |
Ich verstehs nicht, wo ist denn da der Fehler?  |
|