Qd je lance le petit prog, j'ai ce message d'erreur : "Line 8 - DoLine() is not a function, an array, or a linked list"
Code : Tout sélectionner
OpenScreen(640, 480, 32, "DoLine")
;- Boucle
Repeat
ClearScreen(0, 0, 0)
For i.w = 0 To 359
DoLine (120,120,500*Sin(i),450*Cos(i),Random(255),Random(255),Random(255))
Next i
FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape) Or WindowEvent() = #PB_Event_CloseWindow
End
;************************************************************************
Procedure DoLine(XStart.w,YStart.w,xend.w,YEnd.w,CoulR.w,CoulG.w,CoulB.w)
XDifference.w = xend - XStart
YDifference.w = YEnd - YStart
y.w = YStart
YError.w = 0
FrontColor(CoulR,CoulG,CoulB)
For x.w = XStart To xend
Plot(x,y) ';Plot(X-1,Y-1);Plot(X+1,Y+1);Plot(X-1,Y+1);Plot(X+1,Y-1)
YError = YError + YDifference
If YError >= XDifference Then
y = y + 1
YError = YError - XDifference
EndIf
Next
EndProcedure