Hi, I feel your pain, strings can be awkward. Here's some code from an old GAC remake I was trying to do. It is from DB Pro, but it may help you with this.
if keystate(2)=1
krep=1
typemode=2
inc totalverbs
clear entry buffer
repeat
verbupdate()
text 20,570,entry$(1)
if returnkey()=1 and typemode=2 and verb=1
verb$=entry$(1)
for check=1 to len(verb$)
if mid$(verb$,check)<>"" and numfound=0
verbnum$=verbnum$+mid$(verb$,check)
endif
if mid$(verb$,check)<>"" and numfound=1
verbname$=verbname$+mid$(verb$,check)
endif
if mid$(verb$,check)=" "
numfound=1
verb(totalverbs)=val(verbnum$)
endif
NEXT check
typemode=0
verb$(totalverbs)=verbname$
verb(totalverbs)=val(verbnum$)
verbname$=""
verbnum$=""
numfound=0
endif
until typemode=0
endif
I don't think DB is too different from Pro, it has been many years since I have used it. So you should be able to use this with little or no modification. Obviously, you may need to tinker a little to get it to work for you, but that code is fairly decent for splitting strings into words. Saving the array should be fairly simple from there.
Looking at your save code, you seem to try to get data into variable t with this.
t = array count(myarray$())
I assume it is a command in DB. I have never really used them, as they were badly bugged at the time. I have no idea if that was fixed or not. I would save the size of the array in the first (0) element of the array, and check that instead personally. Then you can simply use.
t= myarray$(0)
That way regardless of size you always know the first element holds the total size of the array. Hope that helps.
Edit - lol, fixed before I finished my post. Still the code may help you tidy yours up a little anyway