News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.

Post Reply  Post Thread 
User Prompt
Author Message

Posts: 231
Group: Moderators
Joined: Apr 2007
Status: Offline
Reputation: 0
Post: #1
RE: User Prompt

That is so basic. You think this would be step 2 after hello world.

--[[ lua command line user user input

o = the print() function
p = a prompt to the user
r = response from the computer
i =  i returns input waiting until line feed to continue execution
This example is all one line of code.

o ,p ,r = print, "Enter your name.","Hello "; o(p);; if i then o(r..i) end;

I had no  idea how to interactively give values to programs running in the command line until now. I'm sure its been in our telnet chat script forever and I totally overlooked it.


This post was last modified: 02-29-2008 09:02 AM by iGame3D.

02-29-2008 08:34 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
User Prompt - asafp - 02-27-2008, 08:04 AM
RE: User Prompt - mikshaw - 02-27-2008, 08:34 AM
RE: User Prompt - iGame3D - 02-29-2008 08:34 AM
RE: User Prompt - mikshaw - 03-01-2008, 06:59 AM
RE: User Prompt - asafp - 03-05-2008, 03:34 PM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: