I need some help with types again?
Blitz3D Forums/Blitz3D Programming/I need some help with types again?
| ||
Hello, I'm having problems with types I think. I written some code that loads and image lets you choose how many pieces to break it into, changes each piece in a type and arranges them to form the complete image. When you move the mouse above an image that image is selected, then by pressing a numpad key [8],[4],[6],[2] it returns the color of the center pixel. This works fine for the up and down (keys[8],[2]) but doesn't return any color for keys[4] and [6]. I can't find a problem, could anyone offer suggestions? complete code: |
| ||
It looks like you used " miniheight" instead of "minipic\ycenter" in the cases 75 an 77: correct: If KeyHit(72) GetColor (minipic\xcenter),(minipic\ycenter - miniheight%) red$ = ColorRed() green$ = ColorGreen() blue$ = ColorBlue() EndIf but different: If KeyHit(75) ;wrong line: GetColor (minipic\xcenter - miniwidth%),(miniheight%) ; ^^^^^^^^^^^^ red$ = ColorRed() green$ = ColorGreen() blue$ = ColorBlue() EndIf perhaps it is like this? If KeyHit(75) GetColor (minipic\xcenter - miniwidth%),(minipic\ycenter) red$ = ColorRed() green$ = ColorGreen() blue$ = ColorBlue() EndIf |