Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / input question....

Author
Message
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 20th Oct 2005 03:02 Edited at: 20th Oct 2005 03:04
hi,ive got some code set up so i can position my objects & get there xyz's.

what im trying to do is be able to use input & change my variable # for the object im currently working with.but i get an error when i input my #.(& yes im inputting a current object #)

suggestions?





Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 20th Oct 2005 03:43 Edited at: 20th Oct 2005 03:45
You have it checking for keystate to ask for the input. When the F key is not pressed Obj#=0... so when it gets down to moving the object you see the error because there cannot be an object #0.

Also object numbers are always whole numbers so it doesn't need to be a real number.
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 20th Oct 2005 04:10 Edited at: 20th Oct 2005 04:11
ok i changed it to this:




it works right now,but after i press the 'f' key my input on screen has 'f',i have to backspace & delete that then enter my #.how do i get rid of that 'f'???
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 20th Oct 2005 07:08
It's because keystate is real fast. I would use "inkey$()".

David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 20th Oct 2005 09:03 Edited at: 20th Oct 2005 09:04
thanks grog,but i already solved it:



Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 20th Oct 2005 09:05
Quote: "thanks grog,but i already solved it:"


np

Login to post a reply

Server time is: 2024-09-24 07:21:28
Your offset time is: 2024-09-24 07:21:28