I recently uploaded my ScratchSearch project ( http://scratch.mit.edu/projects/The-Whiz/631627 ) and I realized that it does not work when spaces are used. Could someone either help me fix this or tell me a solution?
Offline
I always have trouble understanding other peoples projects that contain lists, but I think the problem is that spaces do not count as letters. You have this script:
repeat length of answer
change letter by 1
add letter letter of answer to letters
So the problem is that it is not reading the spaces. It didn't work offline for me either. You should get in contact with one of the Scratch team, and ask them to fix that bug.
Last edited by WeirdF (2009-08-18 01:28:58)

Offline
No...I'm pretty sure it's not the spaces alone that are causing you trouble. Take a look at this project (which works fine)
http://scratch.mit.edu/projects/Paddle2SeeFixIt/651310
Where you are running into trouble is when you have a search word that is longer than the word you are comparing it to...but matches at every position. So if you are searching for "Scratch Team" and one of the words you are comparing it to is "Scratch", your loop is going to continue to try to compare letters from "Scratch Team" to letters that don't exist in "Scratch". You might want to just immediately reject any words that are shorter than the one you are searching for.
Offline
Paddle2See wrote:
No...I'm pretty sure it's not the spaces alone that are causing you trouble. Take a look at this project (which works fine)
http://scratch.mit.edu/projects/Paddle2SeeFixIt/651310
Where you are running into trouble is when you have a search word that is longer than the word you are comparing it to...but matches at every position. So if you are searching for "Scratch Team" and one of the words you are comparing it to is "Scratch", your loop is going to continue to try to compare letters from "Scratch Team" to letters that don't exist in "Scratch". You might want to just immediately reject any words that are shorter than the one you are searching for.
This proves that I'm always wrong when I try to help people. It keeps happening!

Offline
WeirdF wrote:
Paddle2See wrote:
No...I'm pretty sure it's not the spaces alone that are causing you trouble. Take a look at this project (which works fine)
http://scratch.mit.edu/projects/Paddle2SeeFixIt/651310
Where you are running into trouble is when you have a search word that is longer than the word you are comparing it to...but matches at every position. So if you are searching for "Scratch Team" and one of the words you are comparing it to is "Scratch", your loop is going to continue to try to compare letters from "Scratch Team" to letters that don't exist in "Scratch". You might want to just immediately reject any words that are shorter than the one you are searching for.This proves that I'm always wrong when I try to help people. It keeps happening!
Don't feel bad... He's been on Scratch a lot longer than you.
Paddle2See wrote:
No...I'm pretty sure it's not the spaces alone that are causing you trouble. Take a look at this project (which works fine)
http://scratch.mit.edu/projects/Paddle2SeeFixIt/651310
Where you are running into trouble is when you have a search word that is longer than the word you are comparing it to...but matches at every position. So if you are searching for "Scratch Team" and one of the words you are comparing it to is "Scratch", your loop is going to continue to try to compare letters from "Scratch Team" to letters that don't exist in "Scratch". You might want to just immediately reject any words that are shorter than the one you are searching for.
Thanks for helping!
Last edited by The-Whiz (2009-08-25 07:22:12)
Offline