
-----------------------------------
noobsauce
Tue Oct 14, 2008 6:14 pm

Why isn't the input working? Look to see code
-----------------------------------
Here is the  code:
var name : string (100) 
var timetoexit : char
loop
locate (8, 12)
    get name : *
cls
get timetoexit
exit when timetoexit = 'n'
end loop
 for some reason turing only get the name 1ce, it skips the input for name after the first time? Anyone know what is wrong and how i can fix it? thanks

-----------------------------------
The_Bean
Tue Oct 14, 2008 7:06 pm

Re: Why isn't the input working? Look to see code
-----------------------------------
I believe that it's the ": *" after get name that is causing the problem.

-----------------------------------
noobsauce
Tue Oct 14, 2008 7:10 pm

Re: Why isn't the input working? Look to see code
-----------------------------------
So do I have to input name as different strings, or is there an alternative way?

-----------------------------------
andrew.
Tue Oct 14, 2008 7:10 pm

RE:Why isn\'t the input working? Look to see code
-----------------------------------
You declared the variable as 100 characters in the string, I think you should take out the 100 in the declaration, or you should change the * to 100.

-----------------------------------
The_Bean
Tue Oct 14, 2008 7:13 pm

Re: Why isn't the input working? Look to see code
-----------------------------------
To fix this turn timetoexit into a string of length 1
and use getch(timetoexit) 

var timetoexit : string(1)
getch (timetoexit)


-----------------------------------
noobsauce
Tue Oct 14, 2008 7:13 pm

Re: RE:Why isn\'t the input working? Look to see code
-----------------------------------
You declared the variable as 100 characters in the string, I think you should take out the 100 in the declaration, or you should change the * to 100.
Doesn't seem to be workjing :( I've tried both method but the program still ignoring the the fact that I put get name

-----------------------------------
noobsauce
Tue Oct 14, 2008 7:16 pm

Re: Why isn't the input working? Look to see code
-----------------------------------
To fix this turn timetoexit into a string of length 1
and use getch(timetoexit) 

var timetoexit : string(1)
getch (timetoexit)

Doesn't work perfectly as it skips the input for name right  after but is fine for the time after, so wasted a loop everytime i type name-.-

-----------------------------------
The_Bean
Tue Oct 14, 2008 7:19 pm

Re: Why isn't the input working? Look to see code
-----------------------------------
You might not have put them in the right spot.  Those two lines were just what you should replace the others with, they shouldn't appear like that in the code.

-----------------------------------
noobsauce
Tue Oct 14, 2008 7:25 pm

Re: Why isn't the input working? Look to see code
-----------------------------------
Thanks, works perfect:D
