Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Other Programming > Other Programming Languages
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Other Programming Languages If you have a coding issue to discuss about another language that really isn't provided for in any other forum here (not ASP.NET C#, C++, VB, PHP, JavaScript, Python, Java, Perl, Applescript, XML or any of the other forum topics we have), post it here. Enough discussion on a language we don't have covered could prompt a new forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Other Programming Languages section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 13th, 2007, 05:13 PM
Registered User
 
Join Date: Nov 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default lua - HELP, PLEASE!

This is a general programming question.

I am using an editor called wxluaeditor, writing code, and trying to run it...but nothing works.

How does one script something then test it? What program would you use to do that in Lua?

The code is very simple (from a website somewhere)

function mySqr(x) -- Define a Function
     return x*x; -- ';' is optional
end

print("Square Calculator")

print("Enter a number :")
n = io.read("*number")
print(mySqr(n))

but after it prints Enter a Number, it doesnt go any further. I tried saving it and opening it from the desktop (with lua's console), but it crashes after I put a number in.

PLEASE, SOMEONE, ANYONE, HELP!

thanks.


Reply With Quote
  #2 (permalink)  
Old November 13th, 2007, 05:20 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

This isn't a general programming question, it is directly related to Lua.

The only Lua forum on this site is the one related to the book that Wrox publishes but you might find some help there: http://p2p.wrox.com/forum.asp?FORUM_ID=300

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor :.
Wrox Books 24 x 7
================================================== =========
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lua build Triezen BOOK Beginning Lua Programming ISBN: 978-0-470-06917-2 0 January 2nd, 2008 06:08 AM
Lua install and Luaedit ashzr BOOK Beginning Lua Programming ISBN: 978-0-470-06917-2 0 November 19th, 2007 10:00 AM
Lua error messages trav BOOK Beginning Lua Programming ISBN: 978-0-470-06917-2 1 June 3rd, 2007 01:21 PM
dummy lua install Brad C BOOK Beginning Lua Programming ISBN: 978-0-470-06917-2 2 March 28th, 2007 11:36 AM
Beginning LUA trav BOOK Beginning Lua Programming ISBN: 978-0-470-06917-2 11 February 20th, 2007 07:47 AM



All times are GMT -4. The time now is 07:45 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.