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.

Author
Message
The dude guy
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: In the streets of sasatuin
Posted: 30th Oct 2004 10:55
Anyone know where you can find that mad gibs tutorial online? I liked that one but I had to rent it from a library and it took 2 months to get in from Maine!

Here's my forums www.andrewtamalunas.proboards28.com . Please join!

The dude guy
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: In the streets of sasatuin
Posted: 2nd Nov 2004 22:39
Anybody?

Here's my forums www.andrewtamalunas.proboards28.com . Please join!

The dude guy
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: In the streets of sasatuin
Posted: 2nd Nov 2004 23:45
Sorry for the triple post but the thing I need help with is the INPUT command. I want the person to input a name or something and then it appears in a scentence.

Here's my forums www.andrewtamalunas.proboards28.com . Please join!

Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 2nd Nov 2004 23:52
Like...

Input "Your name?",myname$
Print "My name is "+myname$+", and don't wear it out."

You see text is treated a bit like a numeric variable in that you can check if 1 text string '>' another, which is great for sorting routines - but if you add 2 strings together with a '+', it adds them together in a longer string.


Van-B


Muhahahahaha.
The dude guy
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: In the streets of sasatuin
Posted: 2nd Nov 2004 23:55
When I input my name it ends the program... How do I fix that?

Here's my forums www.andrewtamalunas.proboards28.com . Please join!

Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 3rd Nov 2004 00:04
Well I'd use a wait key, or something - but really that's not important, as long as you know how to use the input command, you can forget about it's existence .

It's really just hitting the end of the program without waiting - a wait key, or a little loop would do it. For example, to wait on the return key to be pressed:

While returnkey()=0 : endwhile


Van-B


Muhahahahaha.
The dude guy
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: In the streets of sasatuin
Posted: 3rd Nov 2004 00:08
Thanks! I'll be sure to credit you in my Mad Libs game I'm creating! Over 300 Mad Libs to do! It'll be a big project but I hope it'll be well worth it!

Here's my forums www.andrewtamalunas.proboards28.com . Please join!

The dude guy
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: In the streets of sasatuin
Posted: 3rd Nov 2004 00:14
When i do this


It doesn't put in the name, it puts in +NAME$+ grr... please help. I'm confused!

Here's my forums www.andrewtamalunas.proboards28.com . Please join!

Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 3rd Nov 2004 00:19
Input "A name please",NAME1$
Input "An animal's name",ANIMAL$
Input "Enter a noun",NOUN$

Print NAME1$+"Was eating "+ANIMAL$+"When he saw"+NOUN$

Wait key

See your text sections need inverted commas (e.g. "your text"), but your string variables don't. Note the variable NAME1$ as well, don't know if that was a typo, but it would'nt have worked without setting NAME1$ in the input part.


Van-B


Muhahahahaha.
The dude guy
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: In the streets of sasatuin
Posted: 3rd Nov 2004 00:21
Thanks and sorry for all the trouble.

Here's my forums www.andrewtamalunas.proboards28.com . Please join!

The dude guy
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: In the streets of sasatuin
Posted: 3rd Nov 2004 00:24 Edited at: 3rd Nov 2004 00:27
Is there any way there can be a space right after where it asks you to input stuff so it looks like:

Please enter a name: Bob

Instead of:

Please enter a name:Bob

And please help me with why there's no space in here between NAME$+ "Was eating a"

Here's my forums www.andrewtamalunas.proboards28.com . Please join!

Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 3rd Nov 2004 01:00
Firstly, it's no trouble at all, good to see someone putting in the effort to learn this stuff.

Try this code:

Input "A name please: ",NAME1$
Input "An animal's name: ",ANIMAL$
Input "Enter a noun: ",NOUN$

Print NAME1$+" Was eating "+ANIMAL$+" When he saw "+NOUN$


You should set all that stuff inside the inverted commas.


Van-B


Muhahahahaha.

Login to post a reply

Server time is: 2024-09-23 04:18:40
Your offset time is: 2024-09-23 04:18:40