This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2013-02-26 12:54:50

lauta
New Scratcher
Registered: 2013-02-02
Posts: 8

Help with my scratch script

the problem i have to make my cat ask me a password like( what is your password) . The right password should contain 8 letters .If your password is too short u gonna get  notification from your cat like ( your password is not long enough ) how do i do that helpp meee  smile   xx ly people

Offline

 

#2 2013-02-26 14:07:40

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: Help with my scratch script

Okay, here is my idea how:

when gf clicked
repeat until < (length of (answer)) > [8] >
ask [What is your password?] and wait
if < (length of (answer)) < [8] >
say [Sorry, your password is to short.] for (2) secs
say [please try again...] for (2) secs
else
broadcast [log in v]
end
end



Of course, you would have to have a script that when it receives "log in", examines the password and makes sure it's legit, but that shouldn't be to hard.

If you have anymore questions or you're having problems with this scripts, ask away.  wink

Regards,

CAA14

Last edited by CAA14 (2013-02-26 14:10:42)

Offline

 

#3 2013-02-26 15:41:45

lauta
New Scratcher
Registered: 2013-02-02
Posts: 8

Re: Help with my scratch script

I did the same but it didn't work  sad ((((((((((((((((((((((((((

Offline

 

#4 2013-02-26 15:49:50

lauta
New Scratcher
Registered: 2013-02-02
Posts: 8

Re: Help with my scratch script

ommmgggg it works !! omg thank u very very much :v :v  and do u kno how to write the analyse and algorithm of this script????

Offline

 

#5 2013-02-26 16:22:17

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: Help with my scratch script

i am glad i could help.  smile

Umm.... I could figure it out, but i think i will give you the challenge with these hints:

- The password needs to be saved in a variable or a list.
- Use the answer condition to test against a standing password.

Try your best, and if you still can't get it, i will see what i can do.  smile
But, i am pretty sure you'll do just fine.  wink

Regards,

CAA14

Offline

 

Board footer