Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

The 20 Line Challenge / 20 lines chat box ( "MYchatBox" )

Author
Message
andrew pap
16
Years of Service
User Offline
Joined: 30th Mar 2007
Location:
Posted: 14th Nov 2010 02:14
this is a verry basic chatBox you may what to add to
as i tryed to keep it to 20 lines it only knows "hello"
and "what time is it" please let me know that you think

the code start on next line` MYchatbox by andrew papworth
set display mode 640,480,32 : `setup
set window on
do :` start loop
input "YOU SAY ",a$ :`get input from user
tex$ = lower$(a$) `make all text lower case
select tex$
case "hello":`********************* read text (copy this)
print "I SAY hello" :`reply text here
endcase :`************************** end read (stop copy)
case "what time is it"
print "I SAY the time is ",get time$()
endcase
case default
print "sorry i do not know what you are saying please add the in my code"
print "andrew tryed to keep the code to less than 20 lines"
endcase
endselect
sleep 3000: cls
loop :` line 20 the end

flame
Daygamer
14
Years of Service
User Offline
Joined: 16th Mar 2010
Location: United States
Posted: 10th Dec 2010 19:38 Edited at: 10th Dec 2010 19:50
Cool Andrew,

The time thing was clever. I would suggest organizing your in a code box like this this so it's easier for others to handle.



You just put this in front of your code [ code ] (without the spaces)
and this at the end [ /code ] (without the spaces)

keep coding!

yrotate when you can spin?
God Bless!
andrew pap
16
Years of Service
User Offline
Joined: 30th Mar 2007
Location:
Posted: 11th Dec 2010 19:25
thank you this was my first post
i did not know how to set it out
i will do this next time

flame
Daygamer
14
Years of Service
User Offline
Joined: 16th Mar 2010
Location: United States
Posted: 12th Dec 2010 04:58 Edited at: 12th Dec 2010 05:00
No problem, Andrew. See you around the forum.

Edit: I did exactly what you did on my first post too. haha

yrotate when you can spin?
God Bless!
reaper666
13
Years of Service
User Offline
Joined: 8th Feb 2011
Location: merced
Posted: 8th Apr 2011 21:16
[email]

steven davis
Marry Jacobson
12
Years of Service
User Offline
Joined: 19th Jun 2011
Location:
Posted: 19th Jun 2011 12:01 Edited at: 19th Jun 2011 18:30
Thanks for the nice information given. Very good blog to seek knowledge.

Your signature has been erased by a mod coz it's got crappy medical ads in
andrew pap
16
Years of Service
User Offline
Joined: 30th Mar 2007
Location:
Posted: 21st Jun 2011 10:52
i have now added more code to this so it tells replys with sound

****************************************************************

case "hello":`********************* read text (copy this)
print "I SAY hello" :`reply text here
send voice message "Hello" :` you need the plugin to do this
endcase :`************************** end read (stop copy)

flame

Login to post a reply

Server time is: 2024-03-29 05:37:53
Your offset time is: 2024-03-29 05:37:53