How would you write Scar script that will print a message when you hit space. I've done this: if IsKeyDown(32) then Writeln 'You have pressed space!'; But I don't know why it comes up with an error.
ok maybe this code example could help Code (Text): program Example; begin while(not IsKeyDown('q') )do begin if( IsKeyDown(' ') )then begin Writeln('You have pressed space!'); wait(15); end; end; end. ^^ the iskeydown need and char between ' ', as 'a', space is ' ' character
Great example zav... you might want to change the wait time to: Code (Text): wait(1000); otherwise just pressing the key might return a lot of "You have pressed space"
First, you want to have a repeat and until around it so that it will check over and over. Otherwise the script will check once, if it isn't down at that exact moment, no message. Second of all, can you please post the error?