Probleme mit Types?
Übersicht

bruce85Betreff: Probleme mit Types? |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Hallo,
ich habe ein kleines problem mit Types, und zwar brauche ich ein befehl der den ImagesCollide verlässt, weiss jetzt net ob das geht. Hier mal der Code: Code: [AUSKLAPPEN] For s.schuss = Each schuss
DrawImage schuss,s\schuss_x,s\schuss_y s\schuss_y = s\schuss_y - 5 For b.ball = Each ball If ImagesCollide(schuss,s\schuss_x,s\schuss_y,0,ball_red,b\ball_x,b\ball_y,b\ball_frames) Then If b\ball_frames = 2 Or b\ball_frames = 5 Or b\ball_frames = 8 Then Delete b.ball Delete s.schuss EndIf If b\ball_frames = 1 Or b\ball_frames = 4 Or b\ball_frames = 7 Then merk_x = b\ball_x merk_y = b\ball_y Delete b.ball Delete s.schuss b.ball = New ball b\ball_x = merk_x b\ball_y = merk_y b\ball_frames=2 b\ball_richtung = 1 b\ball_richtung2 = 1 b\y_temp=3 b.ball = New ball b\ball_x = merk_x b\ball_y = merk_y b\ball_frames=2 b\ball_richtung = 2 b\ball_richtung2 = 1 b\y_temp=3 EndIf If b\ball_frames = 0 Or b\ball_frames = 3 Or b\ball_frames = 6 Then merk_x = b\ball_x merk_y = b\ball_y Delete b.ball Delete s.schuss b.ball = New ball b\ball_x = merk_x b\ball_y = merk_y b\ball_frames=1 b\ball_richtung = 1 b\ball_richtung2 = 1 b\y_temp=3 b.ball = New ball b\ball_x = merk_x b\ball_y = merk_y b\ball_frames=1 b\ball_richtung = 2 b\ball_richtung2 = 1 b\y_temp=3 EndIf EndIf Next Next das hier wird als letztes ausgeführt: Code: [AUSKLAPPEN] If b\ball_frames = 2 Or b\ball_frames = 5 Or b\ball_frames = 8 Then
Delete b.ball Delete s.schuss EndIf wenn das dann ausgeführt wird, erhalte ichdie Fehlermeldung Types does not Exists. Ich denke mal, es liegt wohl daran das der Code Weiter ausgeführt wird, obwohl kein ball mehr existiert. Hab ihr vieleicht eine ahnung was ich falsch gemacht habe oder ob man das dann überspringen kann? Danke euch schonmal. MfG Andreas |
||
AMD Athlon(tm) II X2 250, 8 GB DDR, MSI MSI 770-C45, GeForce GTS 250 |
![]() |
HolzchopfMeisterpacker |
![]() Antworten mit Zitat ![]() |
---|---|---|
Code: [AUSKLAPPEN] If b\ball_frames = 2 Or b\ball_frames = 5 Or b\ball_frames = 8 Then Delete b.ball Delete s.schuss Exit EndIf Mit Exit kann man eine Schleife verlassen. So verlässt er nach dem Löschen die Ball-Schleife und nimmt sich den nächsten Schuss vor. |
||
Erledige alles Schritt um Schritt - erledige alles. - Holzchopf
CC BY ♫ BinaryBorn - Yogurt ♫ (31.10.2018) Im Kopf da knackt's und knistert's sturm - 's ist kein Gedanke, nur ein Wurm |
bruce85 |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Hey cool, es funktioniert.
Ich dachte immer, dass man mit Exit auch das Ganze Programm beendet, aber funktionieren tuts. Vielen Dank für deine Hilfe. Andreas |
||
AMD Athlon(tm) II X2 250, 8 GB DDR, MSI MSI 770-C45, GeForce GTS 250 |
![]() |
NightPhoenix |
![]() Antworten mit Zitat ![]() |
---|---|---|
programm beenden = end | ||
![]() |
Christoph |
![]() Antworten mit Zitat ![]() |
---|---|---|
ql:exit bricht nur die aktuelle Schleife ab | ||
bruce85 |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Ja, das weiss ich, dass man mit End das Programm beendet, ich dachte auch das man Exit statt End nehmen könnte, um das Programm zu beenden, aber jetzt weiss ich es ja ![]() Vielen Dank. Andreas |
||
AMD Athlon(tm) II X2 250, 8 GB DDR, MSI MSI 770-C45, GeForce GTS 250 |
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group