You should be useing left$ not right$.
realpass$ = ""
starpass$ = ""
typetime = 45
do
cls
if typetime >= 45
if keystate(14) = 1
realpass$ = left$(realpass$, len(realpass$)-1)
else
realpass$ = realpass$ + inkey$()
typetime = 0
endif
endif
starpass$ = ""
for n=1 to len(realpass$)
starpass$ = starpass$ + "*"
next n
if typetime < 45 then typetime = typetime + 1
print "Your real string is: " + realpass$
print "Asterisked, it is: " + starpass$
print "Length of the real pass: " + str$(len(realpass$))
print "Length of the asterisked pass: " + str$(len(starpass$))
loop
Also you can't use maths on strings. a$+b$ joins the strings together. In dbpro ;,+,-,* or / join the 2 strings together, but you should use + or ;.
This is how I would do the same thing.
pass as string : `acutal pass
pass_star as string : `stared pass
pointer as integer : last_key as integer
stop as integer
clear entry buffer : last_key = scancode()
repeat
cls
if scancode() = 14 and last_key <> scancode() and len(pass) > 0 then pass = left$((pass,len(pass)-1))
if asc(entry$()) <> 8 and len(pass) < 16 then pass = pass + entry$()
last_key = scancode()
clear entry buffer
pass_star = ""
for stop = 1 to len(pass)
pass_star = pass_star + "*"
next stop
stop = 0
text 220,250,pass_star
line pointer,254,pointer,265
pointer = 225 + text width(pass_star)
if returnkey() then repeat until returnkey()=0 : stop = 1
until stop = 1
clear entry buffer
cls
print pass
print pass_star
print ""
print "press a key to exit"
wait key
Where you use a simple counter(typetime) may be ok on your comp but the counter will reach 45 a lot quicker on some computers than others. You should use the timer() to check if a certain time has elapsed or do as I do and don't except the input if it is the same key as the last loop.
dbpro : 2ghz p4m : 512mb : geforce 4 4200 go