@Nexic
Sledge told you what you are doing wrong:
There is one function to check if any key is pressed, and that is:
Did that clarify things?
//PetBom
Sledge told you what you are doing wrong:
There are no such commands as KeyUp, KeyRight and KeyLeft
There is one function to check if any key is pressed, and that is:
KeyDown()You will need four variables containing the coresponding scancodes to use with the Keydown() function to determine if the key is pressed:
keyleft=203 keyright=205 keyup=200 keydown=208That would give you a code that looks like this:
If KeyDown(keyleft) Then px=px-1 ;This checks if Cursor Left is pressed If KeyDown(keyright) Then px=px+1 ;This checks if Cursor Right is pressed If KeyDown(keyup) Then py=py-1 ;This checks if Cursor Up is pressed If KeyDown(keydown) Then py=py+1 ;This checks if Cursor Down is pressedYour code actually tries to do the opposite thing, i.e. you have four functions (that does not exist) using one variable
Did that clarify things?
//PetBom