KeyDown problem
Übersicht
BlitzBasic
Beginners-Corner
mBetreff: KeyDown problem |
Antworten mit Zitat |
|
|---|---|---|
|
HI was ist hir dran faltsch ich kan kein fehler erkennen
eigendlich muss y_pos immer kleiner werden und wen man lertaste drücht wieder auf 3 springen und kleiner werden Code: [AUSKLAPPEN] Repeat If KeyDown(57) Then y_pos=3 ;2.4 Else y_pos=y_pos-0.3 EndIf Print y_pos Until KeyHit(1) |
||
|
|
Last Anquav Hero |
Antworten mit Zitat |
|---|---|---|
|
was ist denn das problem?
edit: ahh ich seh schon: probier mal das Code: [AUSKLAPPEN] Graphics 800,600,16,2 SetBuffer BackBuffer() Global y_pos# Repeat Cls If KeyDown(57) Then y_pos=3 ;2.4 Else y_pos=y_pos-0.3 EndIf print y_pos Flip Until KeyHit(1) |
||
|
|
Ctuchik |
Antworten mit Zitat |
|---|---|---|
|
Das Problem ist einfach, dass die Variable standardmässig eine Integer-Variable ist und nach dem -0.3 wieder aufgerundet wird!
Code: [AUSKLAPPEN] Repeat If KeyDown(57) Then y_pos#=3.0 ;2.4 Else y_pos=y_pos-0.3 EndIf Print y_pos Until KeyHit(1) So sollte es gehn! mfG Ctuchik |
||
Leonb |
Antworten mit Zitat |
|
|---|---|---|
|
ja!
y_Position muss eine float sein! (y_Position#) |
||
|
meine HP:
http://www.scz.de.ms |
||
Übersicht
BlitzBasic
Beginners-Corner
Powered by phpBB © 2001 - 2006, phpBB Group
